I believe Corion is on the right track. You have

1 until (-1 == waitpid(-1, WNOHANG));
While perlipc uses
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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.