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?]



Bart Schaefer wrote:
> 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 ?

I'm not sure what that gains, apart from an extra error message; is
there a case where it's important that exited background jobs can't be
waited for?  I can see one oddity, which is you can wait for it multiple
times without an error (and with the same return status); I could fix
that but I see bash does the same.

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



Messages sorted by: Reverse Date, Date, Thread, Author