zsh-workers
 help / color / mirror / code / Atom feed
* bug in zsh wait builtin - rhbz#1150541
@ 2014-10-21  7:53 Tim Speetjens
  2014-10-21 20:02 ` Peter Stephenson
  0 siblings, 1 reply; 17+ messages in thread
From: Tim Speetjens @ 2014-10-21  7:53 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

Dear zsh workers,

I'ld like to report a bug originally filed in
https://bugzilla.redhat.com/show_bug.cgi?id=1150541 which is still present
in the latest version, 5.0.7

Title:
zsh wait builtin shows an error and doesn't propagate exit code for a
finished child process

Description of problem:
When a child process is started, and finished before a call to wait, an
error is signaled. Also the exit code for wait is 1, where it should be the
exit code of the child process

Version-Release number of selected component:
zsh-4.3.10-7 (rhel6, x86_64)
zsh-5.0.2-7 (rhel7, x86_64)
zsh 5.0.7 (f21 rawhide, x86_64)
zsh 5.0.7 from source

How reproducible:
100%

Steps to Reproduce:
Run the following script with zsh (or with zsh in ksh emulation mode):
#!/bin/ksh
sh -c "echo done" &
pid1=$!
sleep 1
wait $pid1
echo "rc: $?"

sh -c "exit 3" &
pid2=$!
sleep 1
wait $pid2
echo "rc: $?"

Actual results:
$ zsh test.sh
done
test.sh:wait:5: pid 6156 is not a child of this shell
rc: 1
test.sh:wait:11: pid 6159 is not a child of this shell
rc: 1


Expected results (also seen when running the script with bash or mksh):
$ zsh test.sh
done
rc: 0
rc: 3


Kind regards
Tim Speetjens

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-10-26 21:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-21  7:53 bug in zsh wait builtin - rhbz#1150541 Tim Speetjens
2014-10-21 20:02 ` Peter Stephenson
2014-10-22  6:55   ` Bart Schaefer
     [not found]     ` <CAO7vJOjrb=N3xuTJVSb7U8mdXtexYp8nN4YaoknfUb3fofU2zg@mail.gmail.com>
2014-10-22 15:48       ` Bart Schaefer
2014-10-22 18:32     ` Chet Ramey
2014-10-23  8:32     ` Peter Stephenson
2014-10-24  4:50       ` Bart Schaefer
2014-10-24  8:04         ` Tim Speetjens
2014-10-25 19:08         ` Peter Stephenson
2014-10-25 21:54           ` Bart Schaefer
2014-10-25 22:28           ` Bart Schaefer
2014-10-25 22:32             ` Bart Schaefer
2014-10-25 23:04               ` Peter Stephenson
2014-10-25 23:17                 ` Peter Stephenson
2014-10-26 19:01                   ` Peter Stephenson
2014-10-26 20:41                     ` Bart Schaefer
2014-10-26 21:22                       ` 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).