Change 25418 by [EMAIL PROTECTED] on 2005/09/16 12:54:43
Revert change #24194 : select() will continue
to return -1 on error, like in previous versions, and
like other system builtins.
Affected files ...
... //depot/perl/pod/perl593delta.pod#4 edit
... //depot/perl/pod/perlfunc.pod#493 edit
... //depot/perl/pp_sys.c#442 edit
Differences ...
==== //depot/perl/pod/perl593delta.pod#4 (text) ====
Index: perl/pod/perl593delta.pod
--- perl/pod/perl593delta.pod#3~25253~ Mon Aug 1 01:13:10 2005
+++ perl/pod/perl593delta.pod Fri Sep 16 05:54:43 2005
@@ -10,9 +10,6 @@
=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
==== //depot/perl/pod/perlfunc.pod#493 (text) ====
Index: perl/pod/perlfunc.pod
--- perl/pod/perlfunc.pod#492~25414~ Wed Sep 14 05:49:58 2005
+++ perl/pod/perlfunc.pod Fri Sep 16 05:54:43 2005
@@ -4673,7 +4673,8 @@
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,
==== //depot/perl/pp_sys.c#442 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#441~25280~ Wed Aug 10 02:14:23 2005
+++ perl/pp_sys.c Fri Sep 16 05:54:43 2005
@@ -1148,10 +1148,7 @@
}
}
- 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;
End of Patch.