From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: wait gets confused when second argument exits before first (i think)
Date: Sat, 10 Apr 2010 03:37:29 +0200 [thread overview]
Message-ID: <h2g237967ef1004091837w851e3e48sf5765f11027448a8@mail.gmail.com> (raw)
zsh -f
localhost% sleep 2 & a=$\! ; sleep 1 & wait $a $\!
[1] 31989
[2] 31990
[2] + done sleep 1
[1] + done sleep 2
wait: pid 31990 is not a child of this shell
localhost% sleep 2 & a=$\! ; sleep 1 & wait $\! $a
[1] 32121
[2] 32122
[2] + done sleep 1
[1] + done sleep 2
localhost% sleep 1 & a=$\! ; sleep 2 & wait $\! $a
[1] 32125
[2] 32126
[1] - done sleep 1
[2] + done sleep 2
wait: pid 32125 is not a child of this shell
localhost% sleep 2 & sleep 1 & wait %1 %2
[1] 31993
[2] 31994
[2] + done sleep 1
[1] + done sleep 2
wait: %2: no such job
localhost% sleep 2 & sleep 1 & wait %2 %1
[1] 31997
[2] 31998
[2] - done sleep 1
[1] + done sleep 2
localhost% sleep 1 & sleep 2 & wait %2 %1
[1] 32001
[2] 32002
[1] + done sleep 1
[2] + done sleep 2
wait: %1: no such job
So it looks like it doesn't matter if %1 or %2 exits first, just which
is the first argument to wait.
Same happens both on current cvs and on 4.3.6.
--
Mikael Magnusson
next reply other threads:[~2010-04-10 1:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-10 1:37 Mikael Magnusson [this message]
2010-04-10 3:31 ` Bart Schaefer
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=h2g237967ef1004091837w851e3e48sf5765f11027448a8@mail.gmail.com \
--to=mikachu@gmail.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).