From: alexander_bluhm@genua.de Date: Tue, 13 Dec 2005 10:44:47 +0000 (-0800) Subject: [perl #37915] Bad select error handling in Net::Ping X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2708b1f4ca0964d70333e73d846ad866747c9c0a;p=p5sagit%2Fp5-mst-13.2.git [perl #37915] Bad select error handling in Net::Ping From: alexander_bluhm@genua.de (via RT) Message-ID: p4raw-id: //depot/perl@26367 --- diff --git a/lib/Net/Ping.pm b/lib/Net/Ping.pm index bd0855f..fee428c 100644 --- a/lib/Net/Ping.pm +++ b/lib/Net/Ping.pm @@ -16,7 +16,7 @@ use Carp; @ISA = qw(Exporter); @EXPORT = qw(pingecho); -$VERSION = "2.31_02"; +$VERSION = "2.31_03"; sub SOL_IP { 0; }; sub IP_TOS { 1; }; @@ -454,7 +454,7 @@ sub ping_icmp { $nfound = mselect((my $rout=$rbits), undef, undef, $timeout); # Wait for packet $timeout = $finish_time - &time(); # Get remaining time - if (!defined($nfound)) # Hmm, a strange error + if ($nfound == -1) # Hmm, a strange error { $ret = undef; $done = 1;