Can process do an asynchronous wait?

Paul John Falstad pfalstad at phoenix.Princeton.EDU
Thu May 31 15:56:22 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. 

If your system has it, use wait3(2) with the WNOHANG flag.

-- 
Paul Falstad  PLINK:Hypnos GEnie:P.FALSTAD net:pfalstad at phoenix.princeton.edu
Disclaimer: My opinions, which belong to me and which I own, are mine.
-Anne Elk (not AN elk!)  The sun never set on the British empire because
the British empire was in the East and the sun sets in the West.



More information about the Comp.unix.questions mailing list