Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: wait for non-child PID



> > % wait 1
> > 
> > blocks forever.  (It is interruptible.)
> > 
> > bash detects that the PID is not child of the shell.
> 
> I'm glad that zsh's wait will wait on processes that aren't children of the
> shell.  Is there a reason that it shouldn't?

Because the shell will never get a SIGCHLD to notify it that the process
has changed state.  A process only gets SIGCHLD when its immediate children
change state.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@xxxxxxxxxxx    http://cnswww.cns.cwru.edu/~chet/



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