Can process do an asynchronous wait?

Conor P. Cahill cpcahil at virtech.uucp
Thu May 31 23:36:01 AEST 1990


In article <30343 at cup.portal.com> tms at cup.portal.com (Alexis TMS Tatarsky) writes:
>If a process forks and execs several child processes, is there any
>way for the parent to detect when the child processes have exited 
>or died without having to wait(2) on them.  I wrote a program where
>the parent caught SIGCLD but I don't know which child it is which
>died. 

The signal handler for the SIGCLD should do a wait() which will provide
the process id and exit status of the child. The fact that you got 
a SIGCLD tells you that the wait will not block, so you don't have
to worry about getting stuck in there.


-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.unix.questions mailing list