From: Ilya Zakharevich Date: Fri, 9 Jul 1999 04:27:51 +0000 (-0400) Subject: File descriptor leak in do_exec3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2f96c7027cf9ba783b07d2fd9195877ecc1a4b55;p=p5sagit%2Fp5-mst-13.2.git File descriptor leak in do_exec3 Message-Id: <199907090827.EAA03321@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@3678 --- diff --git a/util.c b/util.c index 1ed48d2..f4857cf 100644 --- a/util.c +++ b/util.c @@ -2304,10 +2304,11 @@ Perl_my_popen(pTHX_ char *cmd, char *mode) break; n += n1; } + PerlLIO_close(pp[0]); + did_pipes = 0; if (n) { /* Error */ if (n != sizeof(int)) Perl_croak(aTHX_ "panic: kid popen errno read"); - PerlLIO_close(pp[0]); errno = errkid; /* Propagate errno from kid */ return Nullfp; }