Question on fork(), exec(), kill()

Doug Gwyn gwyn at smoke.brl.mil
Mon May 27 13:14:47 AEST 1991


In article <29877 at hydra.gatech.EDU> gt0178a at prism.gatech.EDU (BURNS) writes:
>If the SIG_DFL for SIGCHLD is to discard the signal, why do you HAVE to
>wait for the child?

I can't speak for HP-UX, but in general SIGCHLD/SIGCLD is pretty badly
botched.  In the original System V implementation, how you set SIGCLD
also determines the semantics for a subsequent wait() system call.  All
I can suggest is (a) leave SIGCLD alone, and (b) if you're trying to
use SIGCLD anyway, check the SPECIFIC system manual and be very careful.

In good old original UNIX, the only way to get rid of a zombie was to
wait() on it, and if its parent terminated, then init (Process #1) would
inherit it and IT would wait() on it.



More information about the Comp.unix.questions mailing list