dirtdart has asked for the wisdom of the Perl Monks concerning the following question:
I then add it to my IO::Select by:$client->{socket} = IO::Socket::UNIX->new(Type => SOCK_STREAM, Listen +=> 5, Local => $filename); chmod 777, $filename;
and attempt to wait for a connection by:$sel->add($client->{socket});
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:while($sel->can_read) { ... }
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?defined ($r) && (select($r, undef, undef, $timeout) > 0)) ? handles(&v +ec, $r) : ();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with IO::Select
by ikegami (Patriarch) on Jul 02, 2006 at 17:56 UTC | |
by dirtdart (Beadle) on Jul 02, 2006 at 18:43 UTC | |
by ikegami (Patriarch) on Jul 02, 2006 at 19:03 UTC | |
|
Re: Problems with IO::Select
by ikegami (Patriarch) on Jul 02, 2006 at 22:38 UTC | |
by dirtdart (Beadle) on Jul 02, 2006 at 23:30 UTC | |
|
Re: Problems with IO::Select
by Hue-Bond (Priest) on Jul 02, 2006 at 19:11 UTC | |
by dirtdart (Beadle) on Jul 02, 2006 at 20:29 UTC | |
by ikegami (Patriarch) on Jul 02, 2006 at 20:49 UTC | |
by dirtdart (Beadle) on Jul 02, 2006 at 21:22 UTC | |
by ikegami (Patriarch) on Jul 02, 2006 at 22:33 UTC | |
| |
|
Re: Problems with IO::Select
by dirtdart (Beadle) on Jul 03, 2006 at 12:32 UTC |