about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2004-04-19 12:34:04 +0000
committerGraham Barr <gbarr@pobox.com>2009-02-24 08:51:38 -0600
commit4fdf870dc660aa87785909ecbe114b4f7040e0e7 (patch)
tree2c348b48617172633106e455ebd610c7a24dba50
parentf58ae5d82506679f273a8961bd93116874d452ed (diff)
downloadperl-libnet-4fdf870dc660aa87785909ecbe114b4f7040e0e7.tar.gz
Ignore select() failure if is a file handle
-rw-r--r--Net/Cmd.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Net/Cmd.pm b/Net/Cmd.pm
index 0324a9b..a84b4da 100644
--- a/Net/Cmd.pm
+++ b/Net/Cmd.pm
@@ -21,7 +21,7 @@ BEGIN {
   }
 }
 
-$VERSION = "2.25";
+$VERSION = "2.26";
 @ISA     = qw(Exporter);
 @EXPORT  = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
 
@@ -431,7 +431,7 @@ sub datasend
  while($len)
   {
    my $wout;
-   if (select(undef,$wout=$win, undef, $timeout) > 0)
+   if (select(undef,$wout=$win, undef, $timeout) > 0 or -f $cmd) # -f for testing on win32
     {
      my $w = syswrite($cmd, $line, $len, $offset);
      unless (defined($w))