Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: unable to wait on completed job [was: should $! give the pid of subshell?]
- X-seq: zsh-workers 27443
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: unable to wait on completed job [was: should $! give the pid of subshell?]
- Date: Mon, 30 Nov 2009 18:57:20 -0800
- In-reply-to: <20091130183707.4f8ea36e@news01>
- 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
- References: <19213.26295.345572.732238@xxxxxxxxxxxxxxxxxx> <200911251748.nAPHmrCX010198@xxxxxxxxxxxxxx> <m3638sr72x.fsf_-_@xxxxxxxxxxxxxx> <091129211436.ZM1769@xxxxxxxxxxxxxxxxxxxxxx> <20091130183707.4f8ea36e@news01>
On Nov 30, 6:37pm, Peter Stephenson wrote:
}
} If it's only an issue for $! (lastpid internally), I think it's fairly
} straightforward to fix. I tried to make it work even if a new process
} with the same PID came along later.
This looks reasonable, but I wonder if we should make it conditional
on POSIX_JOBS ?
} No idea about anything to do with SIGTTOU, however, that's outside my
} range.
SIGTTOU is only a side-effect. The doc for POSIX_JOBS says:
... When the option is set, the MONITOR option and job control
remain active in the subshell ...
What's happening is that the subshell is not the tty process group
leader, so when MONITOR tries to print the job number and PID (and
later the exit status), the TTY driver stops it because it doesn't
appear to be the foreground job.
What's odder is that "stty -tostop" doesn't prevent this. Something is
effectively reasserting that setting before the subshell gets going.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author