Two things:
  1. The EAGAIN message is consistent with a write to an unavailable, non-blocking socket. It might have been placed into a non-blocking state before a connect call was issued and the script might be attempting to write to it before that connection was actually established. If the socket can't be written to yet, and you attempt to write to it, expect an EAGAIN "error" upon your write. This might just be due to a poor implementation of non-blocking IO.
  2. Instead of doing for (;;) { }, just sleep for a while. What you're basically doing is putting your script in a rather tight infinite loop, which will effectively hold your CPU usage at 100%. Most Unix kernels kind of figure that it's not doing anything productive and lower the priority of the process accordingly, so you might not notice any effects on other processes, but it would help diagnose the problem if your script was sleeping idly instead of working in a tight loop there. One less bit of activity on your system that might be catalyzing a separate problem.

In reply to Re: So is this a kernel limitation, a hardware limitation, or a perl limitation? by Fastolfe
in thread So is this a kernel limitation, a hardware limitation, or a perl limitation? by deprecated

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.