From: Gurusamy Sarathy Date: Fri, 3 Dec 1999 06:15:54 +0000 (+0000) Subject: avoid warning in IO::Select::exists() if socket doesn't exist X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4fdd92761144101d5374ee932c068086c661b214;p=p5sagit%2Fp5-mst-13.2.git avoid warning in IO::Select::exists() if socket doesn't exist p4raw-id: //depot/perl@4628 --- diff --git a/ext/IO/lib/IO/Select.pm b/ext/IO/lib/IO/Select.pm index f021a79..7917102 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]; }