Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1150541

Summary: zsh wait builtin does not work for already exited processes [RHEL-6 moved to RHEL-7 for compatibility reasons]
Product: Red Hat Enterprise Linux 7 Reporter: Tim Speetjens <tspeetje>
Component: zshAssignee: Kamil Dudka <kdudka>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: james.antill, kdudka, michele, ovasik, tspeetje
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1150554 1162198 (view as bug list) Environment:
Last Closed: 2014-11-21 11:29:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1150554    
Bug Blocks:    
Attachments:
Description Flags
reproducer script none

Description Tim Speetjens 2014-10-08 12:13:03 UTC
Description of problem:
When a child process is started, and finished before a call to wait, an error is signaled.

Version-Release number of selected component (if applicable):
zsh-4.3.10-7.el6.x86_64


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:
$ zsh test.sh 
done
rc: 0
rc: 3


Additional info:
This is equally so for running zsh in ksh emulation mode. Running the same script with either bash or mksh, produces the expected result.

Comment 2 Tim Speetjens 2014-10-08 12:23:37 UTC
Created attachment 944977 [details]
reproducer script

Comment 10 Kamil Dudka 2014-11-21 11:29:57 UTC
We already had a RHEL-7 sibling of this bug, merging...

*** This bug has been marked as a duplicate of bug 1150554 ***