* Re: exit status problem
[not found] ` <101204113617.ZM6156@torch.brasslantern.com>
@ 2010-12-05 16:51 ` Peter Stephenson
0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2010-12-05 16:51 UTC (permalink / raw)
To: Zsh Hackers' List
On Sat, 04 Dec 2010 11:36:17 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Dec 4, 2:03am, Vincent Lefevre wrote:
> }
> } A backgrounded pipeline returns a status of zero.
> }
> } It seems to be a bug in zsh 4.3.10 that has been fixed in the latest
> } dev versions. Do you have more information?
>
> It was a bug at least as far back as 4.2.0. Backgrounded jobs appear
> not to have changed the foreground status until sometime post-4.3.10,
> but I'm not finding a likely-looking ChangeLog entry unless this fix
> was a side-effect of adding POSIX_JOBS behavior. Or maybe it's this:
>
> * users/15217: Src/Zle/zle_main.c: use top-level status
> when redrawing prompt.
(Moved to zsh-workers.)
I can't see it explicitly, either, but there were numerous changes that
vaguely affect the area. The most likely looks to me like the change
for resetting the status on a command that executes no code: see
zsh-workers/27106 and some later related fixes. You don't usually get
this at the command line --- you have to do the equivalent of eval'ing
an empty sring --- but it's broadly what's going on here as far as the
main shell is concerned, since all explicit code is executed in a
subshell.
This ensures it stays fixed, now we've noticed.
Index: Test/A05execution.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/A05execution.ztst,v
retrieving revision 1.6
diff -p -u -r1.6 A05execution.ztst
--- Test/A05execution.ztst 7 Aug 2008 16:25:16 -0000 1.6
+++ Test/A05execution.ztst 5 Dec 2010 16:45:53 -0000
@@ -171,3 +171,10 @@
0:trap ZERR
>Command failed again.
>Command failed again.
+
+ false
+ sleep 1000 &
+ print $?
+ kill $!
+0:Status reset by starting a backgrounded command
+>0
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-12-05 17:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20101203152438.GL1727@prunille.vinc17.org>
[not found] ` <20101203160916.42e78913@pwslap01u.europe.root.pri>
[not found] ` <20101204010313.GM1727@prunille.vinc17.org>
[not found] ` <101204113617.ZM6156@torch.brasslantern.com>
2010-12-05 16:51 ` exit status problem Peter Stephenson
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).