Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
bug in zsh wait builtin - rhbz#1150541
- X-seq: zsh-workers 33482
- From: Tim Speetjens <tim.speetjens@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: bug in zsh wait builtin - rhbz#1150541
- Date: Tue, 21 Oct 2014 09:53:33 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=WZsm3rnQf6KttrsjkXzxkwLpXUZn59K3HapVti9h1aQ=; b=tUPloMVITHcmkMTy/e0D1E3eLW7CJhId8TcvOeGsrSedpHOQtG9sUZZuHYpY50hS5z 2ndEN5V9xHnWOllqq2ziwQ4HEyTXFbQK1s0GbXP4PECc9cGDgUBZP+4OI70mUVFl4cCu kyCdTvI+/JF77+DXcULPqCNhx890YauO5Gj956Kt85t7i0SEekgB3fjrOr8ArR4FrrZk DPMDfz1Ul/PaqdUe7MY9HVeUCFj9tI4TdF2SOAXUewL+3F13vwMuHDagX2cTlT7QQT8S j5y+37sSNfkiUP99YUSs6JdZFmmzFvZa4sZeZgf84pdwxb0jGsHKjM6p2+xyz5zgr9s9 Uz7A==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author