in reply to Re^2: $SIG{CHILD} misses on zombies
in thread $SIG{CHILD} misses on zombies
Are you doing the waitpid in a loop like I did? That should clear up all zombies that are waiting at that point.
This may help you see how many children were waiting at a given time. You can also throw in more debugging such as log the output from ps or something to see the states of all processes on the system, then you can manually identify what is actually running, zombied, etc., both before and after the waitpid loop.sub child_handler { my $i; ++$i while -1 != waitpid -1, WNOHANG; print "Reaped $i children\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: $SIG{CHILD} misses on zombies
by gmantz (Initiate) on Sep 07, 2005 at 08:39 UTC |