How can a child detect the death of its parent

Kenneth Herron kherron at ms.uky.edu
Fri Jun 7 12:00:43 AEST 1991


bergquis at nms.gdc.portal.com (Brett Bergquist) writes:

>I know how to detect the death of the child process using SIGCLD in the parent,
>but how can I detect the death of the parent process in the child?

You can check your PPID (parent's process ID) and see if it has changed
to 1.  PPID should never start out 1 from a child process.
-- 
Kenneth Herron                                            kherron at ms.uky.edu
University of Kentucky                                       +1 606 257 2975
Department of Mathematics       "So this won't be a total loss, can you make
         it so guys get to throw their mothers-in-law in?"  "Sure, why not?"



More information about the Comp.unix.questions mailing list