diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-23 14:32:22 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-23 14:32:22 -0500 |
commit | af2fe5eb7afec48a3c828cbfe5de7011288fb6d2 (patch) | |
tree | 0f7c8ebf23fa53cdc37054590b35eec44a94e8fc /pp_sys.c | |
parent | 2102d7a2adc27f86a21271a4721de2799b5158a0 (diff) | |
download | perl-af2fe5eb7afec48a3c828cbfe5de7011288fb6d2.tar.gz |
fork() should return undef on failure, even in list context
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4046,7 +4046,7 @@ PP(pp_fork) } #endif if (childpid < 0) - RETSETUNDEF; + RETPUSHUNDEF; if (!childpid) { #ifdef PERL_USES_PL_PIDSTATUS hv_clear(PL_pidstatus); /* no kids, so don't wait for 'em */ @@ -4063,7 +4063,7 @@ PP(pp_fork) PERL_FLUSHALL_FOR_CHILD; childpid = PerlProc_fork(); if (childpid == -1) - RETSETUNDEF; + RETPUSHUNDEF; PUSHi(childpid); RETURN; # else |