summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-03 06:15:54 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-03 06:15:54 +0000
commit4fdd92761144101d5374ee932c068086c661b214 (patch)
treebdee1c8528e74881458ff89911aceb7c2f1dc9bb
parent5920a0ba1d561db9223b9544f4285f9725073039 (diff)
downloadperl-4fdd92761144101d5374ee932c068086c661b214.tar.gz
avoid warning in IO::Select::exists() if socket doesn't exist
p4raw-id: //depot/perl@4628
-rw-r--r--ext/IO/lib/IO/Select.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/IO/lib/IO/Select.pm b/ext/IO/lib/IO/Select.pm
index f021a797ec..79171023e6 100644
--- a/ext/IO/lib/IO/Select.pm
+++ b/ext/IO/lib/IO/Select.pm
@@ -46,7 +46,9 @@ sub remove
sub exists
{
my $vec = shift;
- $vec->[$vec->_fileno(shift) + FIRST_FD];
+ my $fno = $vec->_fileno(shift);
+ return undef unless defined $fno;
+ $vec->[$fno + FIRST_FD];
}