From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Strange function/pipestatus behavior, maybe a scope bug?
Date: Thu, 24 Oct 2013 09:39:29 -0700 [thread overview]
Message-ID: <131024093930.ZM28329@torch.brasslantern.com> (raw)
In-Reply-To: <20131024164829.55842279@pwslap01u.europe.root.pri>
On Oct 24, 4:48pm, Peter Stephenson wrote:
} Subject: Re: Strange function/pipestatus behavior, maybe a scope bug?
}
} I can't see any problem here, which might not be too surprising if it's
} a race, but I don't see how the following fix can be wrong if pipestatus
} is now working: the most complicated case appears to be if it gets
} called multiple times and STAT_CURSH is set, but even there it looks
} like it's idempotent with respect to lastval (assuming the information
} hasn't changed, of course).
Unfortunately (see my patch which crossed in the mail with yours) there
are cases where updating lastval both from update_job() and then again
from print_job() will in fact end up with the wrong lastval. You have
to run some pipelines both with and without PIPEFAIL set to see this.
} I don't know if this potentially makes one of the calls removable.
I *suspect* that the call in update_job() is removable, but I got
inconsistent results from testing it both ways (hence my conclusion
that there's still a signal handling race).
next prev parent reply other threads:[~2013-10-24 16:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 18:03 Ian F
2013-10-23 8:21 ` Peter Stephenson
2013-10-23 19:49 ` Ian F
2013-10-23 21:14 ` Peter Stephenson
2013-10-24 5:15 ` Bart Schaefer
2013-10-24 8:57 ` Peter Stephenson
2013-10-24 15:48 ` Peter Stephenson
2013-10-24 16:03 ` Peter Stephenson
2013-10-24 16:44 ` Bart Schaefer
2013-10-24 16:39 ` Bart Schaefer [this message]
2013-10-24 16:26 ` Bart Schaefer
2013-10-24 16:46 ` Peter Stephenson
2013-10-25 0:38 ` Bart Schaefer
2013-10-24 15:17 ` Jun T.
2013-10-24 16:25 ` Peter Stephenson
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=131024093930.ZM28329@torch.brasslantern.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).