I am attempting to create a perl server to listen on a Unix socket. I am creating the socket by:
$client->{socket} = IO::Socket::UNIX->new(Type => SOCK_STREAM, Listen +=> 5, Local => $filename); chmod 777, $filename;
I then add it to my IO::Select by:
$sel->add($client->{socket});
and attempt to wait for a connection by:
while($sel->can_read) { ... }
1. %client is just a hash 2. The file pointed to by $filename does not exist before the call to IO::Socket::UNIX->new and does exist after, so it is getting created 3. The directory where I am creating the file has been chmod'd 777 to ensure this is not a permissions issue. Whenver I reach the while clause, the program immediately ends. If I use the Komodo debugger to step through the code, it ends in IO::Select at the line:
defined ($r) && (select($r, undef, undef, $timeout) > 0)) ? handles(&v +ec, $r) : ();
handles is not being called and it's not returning the empty array, it's simply ending the program. I've tried catching an exception with a try/catch block, but got nothing. Any idea what's going on here?

In reply to Problems with IO::Select by dirtdart

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.