From: Rafael Garcia-Suarez Date: Fri, 16 Sep 2005 12:54:43 +0000 (+0000) Subject: Revert change #24223 : select() will continue X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4189264e895252d9336b503e6f64ea18c10701f6;p=p5sagit%2Fp5-mst-13.2.git Revert change #24223 : select() will continue to return -1 on error, like in previous versions, and like other system builtins. p4raw-link: @24223 on //depot/perl: 5c477709a8f3aa3110d51ae872950c20ff14fed6 p4raw-id: //depot/perl@25418 --- diff --git a/pod/perl593delta.pod b/pod/perl593delta.pod index be27bd3..7d75352 100644 --- a/pod/perl593delta.pod +++ b/pod/perl593delta.pod @@ -10,9 +10,6 @@ L for the differences between 5.8.0 and 5.9.2. =head1 Incompatible Changes -The 4-argument form of select() now returns C on error (instead of --1). - =head1 Core Enhancements =head1 Modules and Pragmata diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 2d6c40c..8054abb 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4673,7 +4673,8 @@ Note that whether C. -On error, C behaves like the select(2) system call : it returns +-1 and sets C<$!>. Note: on some Unixes, the select(2) system call may report a socket file descriptor as "ready for reading", when actually no data is available, diff --git a/pp_sys.c b/pp_sys.c index f082b4c..12d2ac6 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1148,10 +1148,7 @@ PP(pp_sselect) } } - if (nfound == -1) - PUSHs(&PL_sv_undef); - else - PUSHi(nfound); + PUSHi(nfound); if (GIMME == G_ARRAY && tbuf) { value = (NV)(timebuf.tv_sec) + (NV)(timebuf.tv_usec) / 1000000.0;