diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-09-16 12:54:43 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-09-16 12:54:43 +0000 |
commit | 4189264e895252d9336b503e6f64ea18c10701f6 (patch) | |
tree | e01c122fa787b2bb77e2cc936b55ff073267575e | |
parent | 8c18259e23fd9d5fd07b5221a1df53c2111ce455 (diff) | |
download | perl-4189264e895252d9336b503e6f64ea18c10701f6.tar.gz |
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
-rw-r--r-- | pod/perl593delta.pod | 3 | ||||
-rw-r--r-- | pod/perlfunc.pod | 3 | ||||
-rw-r--r-- | pp_sys.c | 5 |
3 files changed, 3 insertions, 8 deletions
diff --git a/pod/perl593delta.pod b/pod/perl593delta.pod index be27bd3319..7d75352818 100644 --- a/pod/perl593delta.pod +++ b/pod/perl593delta.pod @@ -10,9 +10,6 @@ L<perl592delta> for the differences between 5.8.0 and 5.9.2. =head1 Incompatible Changes -The 4-argument form of select() now returns C<undef> on error (instead of --1). - =head1 Core Enhancements =head1 Modules and Pragmata diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 2d6c40cae8..8054abb6eb 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4673,7 +4673,8 @@ Note that whether C<select> gets restarted after signals (say, SIGALRM) is implementation-dependent. See also L<perlport> for notes on the portability of C<select>. -On error, C<select> returns C<undef> and sets C<$!>. +On error, C<select> 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, @@ -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; |