diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-03 06:15:54 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-03 06:15:54 +0000 |
commit | 4fdd92761144101d5374ee932c068086c661b214 (patch) | |
tree | bdee1c8528e74881458ff89911aceb7c2f1dc9bb /ext/IO | |
parent | 5920a0ba1d561db9223b9544f4285f9725073039 (diff) | |
download | perl-4fdd92761144101d5374ee932c068086c661b214.tar.gz |
avoid warning in IO::Select::exists() if socket doesn't exist
p4raw-id: //depot/perl@4628
Diffstat (limited to 'ext/IO')
-rw-r--r-- | ext/IO/lib/IO/Select.pm | 4 |
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]; } |