From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Strange parameter visibility
Date: Sat, 17 Sep 2016 21:55:05 -0700 [thread overview]
Message-ID: <CAH+w=7Y0taBV=MmNPP3Z950Gqo0BDWU4zJqfr-WJ6XDx7ROWNA@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7YtacLo6aY9gT5V27xYbh-wz0Tot1kbPxBiWN1ZXpavRA@mail.gmail.com>
[> workers]
On Sat, Sep 17, 2016 at 9:37 PM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> On Sat, Sep 17, 2016 at 6:42 PM, Eric Cook <llua@gmx.com> wrote:
>>
>> It's a normal assignment just like the x=1. the weirdness is zsh
>> optimizing out a fork in the pipeline, so the scope of the
>> reassignment wasn't just a subshell.
>
> I have to conclude that's a bug -- it's OK to optimize out the fork,
> but not to optimize out its side effects (or cause new ones).
The addvars() that does this is exec.c:2847. I tried copying the
save_/restore_params() wrapper from the nullexec branch near line 3455
(using !forked instead of POSIXBUILTINS as the test), but that results
in core dumps when running "make check". Anybody with a better idea
what's going on here?
next parent reply other threads:[~2016-09-18 5:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20160917181339eucas1p24d214aa618aa96b5a8ddfbf351598da6@eucas1p2.samsung.com>
[not found] ` <87bmzmtmzq.fsf@alfa.kjonca>
[not found] ` <831b307a-a00f-1df7-5136-17fcb769ccaf@gmx.com>
[not found] ` <CAH+w=7YtacLo6aY9gT5V27xYbh-wz0Tot1kbPxBiWN1ZXpavRA@mail.gmail.com>
2016-09-18 4:55 ` Bart Schaefer [this message]
2016-09-29 16:24 ` Peter Stephenson
2016-09-29 17:03 ` Peter Stephenson
2016-09-29 21:28 ` Bart Schaefer
2016-09-29 21:36 ` Bart Schaefer
2016-09-30 8:50 ` Peter Stephenson
2016-09-30 9:36 ` Peter Stephenson
2016-09-30 13:50 ` Peter Stephenson
2016-09-30 19:06 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7Y0taBV=MmNPP3Z950Gqo0BDWU4zJqfr-WJ6XDx7ROWNA@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).