diff options
author | Leon Timmermans <fawaka@gmail.com> | 2018-12-16 01:05:06 +0100 |
---|---|---|
committer | Leon Timmermans <fawaka@gmail.com> | 2018-12-16 01:05:06 +0100 |
commit | 30c869b87739b56280daca3cd44b0588144747b7 (patch) | |
tree | 45eccc20b4577a32cc7895acc6332aedb0a8be59 | |
parent | 0deccbc48080cbdd305d6c0c62702b49ee113ecc (diff) | |
download | perl-30c869b87739b56280daca3cd44b0588144747b7.tar.gz |
Always mark pipe in list pipe-open as inherit-on-exec
This is the my_popen_list counterpart of
c6fe5b981b942ddabb23ed4b7602067e906e6d88
-rw-r--r-- | util.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2330,8 +2330,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 |