summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-04-11 09:11:53 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-04-11 09:11:53 +0000
commit5c477709a8f3aa3110d51ae872950c20ff14fed6 (patch)
tree7e0d206fb658324180b0cc8446682e20826c9435 /pp_sys.c
parent4e74047cb351e6ecf0af03b245859dc97e98c072 (diff)
downloadperl-5c477709a8f3aa3110d51ae872950c20ff14fed6.tar.gz
Make the four-argument form of select() return undef
instead of -1 on error. p4raw-id: //depot/perl@24223
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 4b7944a4df..16f539b79e 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1129,7 +1129,10 @@ PP(pp_sselect)
}
}
- PUSHi(nfound);
+ if (nfound == -1)
+ PUSHs(&PL_sv_undef);
+ else
+ PUSHi(nfound);
if (GIMME == G_ARRAY && tbuf) {
value = (NV)(timebuf.tv_sec) +
(NV)(timebuf.tv_usec) / 1000000.0;