Commit 6dd4a8a2 authored by Leon Timmermans's avatar Leon Timmermans Committed by Niko Tyni

Always mark pipe in list pipe-open as inherit-on-exec

This is the my_popen_list counterpart of
c6fe5b981b942ddabb23ed4b7602067e906e6d88

Origin: upstream, https://perl5.git.perl.org/perl.git/commit/30c869b87739b56280daca3cd44b0588144747b7
Bug: https://rt.perl.org/Public/Bug/Display.html?id=133726
Bug-Debian: https://bugs.debian.org/916313
Patch-Name: fixes/pipe-inherit-on-exec/part2.diff
parent 275485f8
......@@ -2302,8 +2302,10 @@ Perl_my_popen_list(pTHX_ const char *mode, int n, SV **args)
if (p[THAT] != (*mode == 'r')) /* if dup2() didn't close it */
PerlLIO_close(p[THAT]); /* close parent's end of _the_ pipe */
}
else
else {
setfd_cloexec_or_inhexec_by_sysfdness(p[THIS]);
PerlLIO_close(p[THAT]); /* close parent's end of _the_ pipe */
}
#if !defined(HAS_FCNTL) || !defined(F_SETFD)
/* No automatic close - do it by hand */
# ifndef NOFILE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment