Currently IO::Socket::INET->new(Blocking => 0, ....) silently fails to set non-blocking, because it attempts to do the fcntl (or whatever) on the socket before the socket's been created. This patch fixes that. (Only tested on Solaris + Linux; I know nothing about those esoteric OSes from Redmond.) Dave. -- Any [programming] language that doesn't occasionally surprise the novice will pay for it by continually surprising the expert. - Larry Wall --- ext/IO/lib/IO/Socket/INET.pm- Tue Feb 18 21:26:05 2003 +++ ext/IO/lib/IO/Socket/INET.pm Tue Feb 18 21:27:42 2003 @@ -129,8 +129,6 @@ or return _error($sock, $!, $@); } - $sock->blocking($arg->{Blocking}) if defined $arg->{Blocking}; - $proto ||= (getprotobyname('tcp'))[2]; my $pname = (getprotobynumber($proto))[0]; @@ -149,6 +147,11 @@ $sock->socket(AF_INET, $type, $proto) or return _error($sock, $!, "$!"); + if (defined $arg->{Blocking}) { + defined $sock->blocking($arg->{Blocking}) + or return _error($sock, $!, "$!"); + } + if ($arg->{Reuse} || $arg->{ReuseAddr}) { $sock->sockopt(SO_REUSEADDR,1) or return _error($sock, $!, "$!");Thread Next