dgaramond2 has asked for the wisdom of the Perl Monks concerning the following question:
$Server = IO::Socket::UNIX->new(Listen=>1, ...) or die; while(1) { $sock = $Server->accept(); next unless $sock; ... }
Why does sometimes accept() return undef (and thus I need the 'next unless $sock' line)? Shouldn't accept() block and return a valid socket each time?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Empty after accept?
by Fletch (Bishop) on Mar 13, 2006 at 13:08 UTC |