I believe Corion is on the right track. You have
1 until (-1 == waitpid(-1, WNOHANG));
while (($child = waitpid(-1,WNOHANG)) > 0) { $Kid_Status{$child} = $?; }
The key difference being that your reaper continuously loops when waitpid returns 0, which means the a child is still running (depending on the OS). Why would that matter? If you have 2 kids running and one exits, your signal handler will waitpid for the finished child and then loop to waitpid again, since the second child is running, the return is zero so you loop again, and again, and again.
I know that the details of signal handling vary a lot across different OSes so there may be a perfectly valid reason to be using -1, but I can't see why from here.
Update: It's a child, not the child.
In reply to Re: IO::Socket Not responding after period of time and traffic!
by rowdog
in thread IO::Socket Not responding after period of time and traffic!
by aaronwroblewski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |