in reply to Re^2: Problems with IO::Select
in thread Problems with IO::Select
The request was to "Please, post a minimal, working example so we can play with it". What you posted is neither minimal (we shouldn't need get_config or a config file) nor working (get_config is missing. A sample config file is missing. IP_SOCKET is not defined. UNIX_SOCKET is not defined.)
The following works (can_read doesn't return) for me. Does it do the same for you? If so, your problem has nothing to do with the socket or select.
use strict; use warnings; use IO::Socket; use IO::Select; my $sel = IO::Select->new(); my $address = "mysock"; unlink($address); my $sock = IO::Socket::UNIX->new( Type => SOCK_STREAM, Listen => 5, Local => $address ) or die("Unable to create socket $!\n"); chmod 777, $address; $sel->add($sock); while(my @ready = $sel->can_read) { warn; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Problems with IO::Select
by dirtdart (Beadle) on Jul 02, 2006 at 21:22 UTC | |
by ikegami (Patriarch) on Jul 02, 2006 at 22:33 UTC | |
by dirtdart (Beadle) on Jul 02, 2006 at 23:45 UTC |