diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-09-05 01:11:59 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-09-05 05:59:11 -0700 |
commit | 49819382e088a19bed610c193947430231d2761d (patch) | |
tree | a82ef397094eabfa671e7e90744c4b7a87ca5cca /util.c | |
parent | 9090718a57d0f7533af9b7c5d8eb89ee636fb661 (diff) | |
download | perl-49819382e088a19bed610c193947430231d2761d.tar.gz |
util.c:my_pclose: Use NULL in PL_fdpid
PL_fdpid is an AV, and as of ce0d59f AVs use NULL for nonexist-
ent elements.
Without using NULL for deleted elements of PL_fdpid, we end up with
pipes appearing to be open after they have actually been closed.
I don’t know how to write a test for this, but it makes
Proc::ParallelLoop pass its tests.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2755,7 +2755,7 @@ Perl_my_pclose(pTHX_ PerlIO *ptr) svp = av_fetch(PL_fdpid,fd,TRUE); pid = (SvTYPE(*svp) == SVt_IV) ? SvIVX(*svp) : -1; SvREFCNT_dec(*svp); - *svp = &PL_sv_undef; + *svp = NULL; #ifdef OS2 if (pid == -1) { /* Opened by popen. */ return my_syspclose(ptr); |