Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
unable to wait on completed job [was: should $! give the pid of subshell?]
- X-seq: zsh-users 14615
- From: Greg Klanderman <gak@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: unable to wait on completed job [was: should $! give the pid of subshell?]
- Date: Sun, 29 Nov 2009 23:04:54 -0500
- In-reply-to: <200911251748.nAPHmrCX010198@xxxxxxxxxxxxxx> (Peter Stephenson's message of "Wed, 25 Nov 2009 17:48:52 +0000")
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <19213.26295.345572.732238@xxxxxxxxxxxxxxxxxx> <200911251748.nAPHmrCX010198@xxxxxxxxxxxxxx>
- Reply-to: gak@xxxxxxxxxxxxxx
>>>>> On November 25, 2009 Peter Stephenson <pws@xxxxxxx> wrote:
> zsh "exec"s the final
> command since it notices the subshell isn't needed any more so there's
> no point in forking.
Oh cool, I didn't realize zsh did tail recursion..
OK, so let me change the question a bit. If I run this script:
#!/bin/zsh -f
sleep 10 &
pid=$!
sleep 12
wait $pid
I get the error:
| zshbgtest.zsh:wait:12: pid 19673 is not a child of this shell
Using bash or ksh, I can successfully wait on the completed job.
Shouldn't I be able to wait on a job that has completed in zsh?
This is zsh 4.3.10-dev-1, patchlevel 1.4816 if it matters, though
4.2.0 and 4.2.6 behave the same.
thanks,
Greg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author