in reply to $SIG{CHILD} misses on zombies
What does your signal handler look like? My guess is that you're only waiting for a single child when two or three could have all exited at about the same time.
sub child_handler { 1 while -1 != waitpid -1, WNOHANG; }
This way, if there are multiple children who have recently died, you'll get them all. Of course, if all you're trying to do is ignore the children's return codes and prevent zombies, just set $SIG{CHLD} to 'IGNORE', and perl will just Do What I(you) Mean.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: $SIG{CHILD} misses on zombies
by gmantz (Initiate) on Sep 06, 2005 at 06:22 UTC | |
by Tanktalus (Canon) on Sep 06, 2005 at 15:25 UTC | |
by gmantz (Initiate) on Sep 07, 2005 at 08:39 UTC |