summary refs log tree commit diff
path: root/debian/bsdyacc
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2018-04-04 17:54:01 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2018-04-19 18:19:59 +0800
commit3cd57b6ed933c299e4d7c3c1e8390194635bbab8 (patch)
tree4b1ea08ad050cdd12392653c4d4fc05f89f8f5e2 /debian/bsdyacc
parentparser: Fix parameter expansion inside inner double quotes (diff)
downloaddash-3cd57b6ed933c299e4d7c3c1e8390194635bbab8.tar.gz
dash-3cd57b6ed933c299e4d7c3c1e8390194635bbab8.zip
eval: Variable assignments on functions are no longer persistent
Dirk Fieldhouse <fieldhouse@gmx.net> wrote:
>
> In POSIX.1-2017 ("simultaneously IEEE Std 1003.1™-2017 and The Open
> Group Technical Standard Base Specifications, Issue 7")
> <http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09>,
> we read under '2.9.1 Simple Commands'
>
> "Variable assignments shall be performed as follows:
> ...
> -    If the command name is a standard utility implemented as a function
> (see XBD Utility), the effect of variable assignments shall be as if the
> utility was not implemented as a function.
> ...
> -    If the command name is a function that is not a standard utility
> implemented as a function, variable assignments shall affect the current
> execution environment during the execution of the function. It is
> unspecified:
>
>     *   Whether or not the variable assignments persist after the
> completion of the function
>
>     *   Whether or not the variables gain the export attribute during
> the execution of the function
>
>     *   Whether or not export attributes gained as a result of the
> variable assignments persist after the completion of the function (if
> variable assignments persist after the completion of the function)"

POSIX used to require the current dash behaviour.  However, you're
right that this is no longer the case.

This patch will remove the persistence of the variable assignment.

I have considered the exporting the variables during the function
execution but have decided against it because:

1) It makes the code bigger.
2) dash has never done this in the past.
3) You cannot use this portably anyway.

Reported-by: Dirk Fieldhouse <fieldhouse@gmx.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'debian/bsdyacc')
0 files changed, 0 insertions, 0 deletions
amp;follow=1'>Add Conversations With FriendsJune McEnroe The better of the two, but largely the same. I feel like these books are a bit too autobiographical, but I don't know if I'm allowed to accuse an author of that. My real problem is that I read these books as largely uncritical of their characters. They behave in nonsense ways, are mostly uncritical of their own behaviour, and don't really have arcs of growth or change. I suppose this book had a bit of one, but only in the last two chapters. 2022-07-30Add Normal PeopleJune McEnroe Unbearably straight. Eyerolls and sighs per page off the charts. Shout out to Joanna, I guess. I kinda like the lack of quotation marks though to be honest. After half of the Ruth Ozeki novel and now this, I need to get back to some genre fiction. 2022-07-26Rewrite glitch from new pngoJune McEnroe 2022-07-26Update Care with time-to-ID and piercingsJune McEnroe 2022-07-26Add -w to upJune McEnroe 2022-07-13Set push.autoSetupRemoteJune McEnroe 2022-07-08Remove TOURJune McEnroe There is not that much distinct stuff here anymore. 2022-07-03Add The Bone Shard EmperorJune McEnroe Suffers a little bit from middle book but I really enjoyed it. Read it faster than the first one too, despite its length. 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune McEnroe Mixed bag like most collections of short stories. Some of them are pretty good. The author of the worst written story also has the worst written bio. 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe Absolutely indiscriminately. 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe For some reason I haven't been able to figure out, trying to poll /dev/tty returns POLLNVAL (and this was using 100% CPU looping), but using stderr instead works fine. 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe