in reply to Re: exec creating zombie processes
in thread exec creating zombie processes
Cause it complicates things. First, that wouldn't work. You'd have to change the existing waitpid to sleep. You'd end up with:
{ local $SIG{CHLD} = 'IGNORE'; ... launch child ... if (sleep(20)) { kill(KILL => $child_pid); # Wait for child to die before restoring $SIG{CHLD}. # Unlikely race condition. while (kill(0, $child_pid)) { sleep(1) or last; } } }
There are side-effects to using $SIG{CHLD} = 'IGNORE'.
|
|---|