summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2018-01-18 17:11:15 +0100
committerAbigail <abigail@abigail.be>2018-01-18 18:30:41 +0100
commit523d71b314dc75bd212794cc8392eab8267ea744 (patch)
treeaf9674cab1b09d49407f5220121f0f38cbcebd04 /pp_sys.c
parent408956da6c7e0cd9dd2443723d668230c6d6675a (diff)
downloadperl-523d71b314dc75bd212794cc8392eab8267ea744.tar.gz
Revert "make PerlIO handle FD_CLOEXEC"
This reverts commit 2cdf406af42834c46ef407517daab0734f7066fc. The reason for the revert is that with this commit, perl fails to compile on darwin (or at least, one some versions of it): ./miniperl -Ilib make_ext.pl lib/auto/DB_File/DB_File.bundle MAKE="/Applications/Xcode.app/Contents/Developer/usr/bin/make" LIBPERL_A=libperl.a LINKTYPE=dynamic Parsing config.in... Looks Good. dyld: lazy symbol binding failed: Symbol not found: _mkostemp Referenced from: /private/tmp/perl/cpan/DB_File/../../miniperl Expected in: flat namespace dyld: Symbol not found: _mkostemp Referenced from: /private/tmp/perl/cpan/DB_File/../../miniperl Expected in: flat namespace Unsuccessful Makefile.PL(cpan/DB_File): code=5 at make_ext.pl line 518. make: *** [lib/auto/DB_File/DB_File.bundle] Error 2
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 5154b9baa8..1556626484 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -692,6 +692,8 @@ PP(pp_pipe_op)
if (PerlProc_pipe_cloexec(fd) < 0)
goto badexit;
+ setfd_inhexec_for_sysfd(fd[0]);
+ setfd_inhexec_for_sysfd(fd[1]);
IoIFP(rstio) = PerlIO_fdopen(fd[0], "r" PIPE_OPEN_MODE);
IoOFP(wstio) = PerlIO_fdopen(fd[1], "w" PIPE_OPEN_MODE);
@@ -2519,6 +2521,7 @@ PP(pp_socket)
if (fd < 0) {
RETPUSHUNDEF;
}
+ setfd_inhexec_for_sysfd(fd);
IoIFP(io) = PerlIO_fdopen(fd, "r" SOCKET_OPEN_MODE); /* stdio gets confused about sockets */
IoOFP(io) = PerlIO_fdopen(fd, "w" SOCKET_OPEN_MODE);
IoTYPE(io) = IoTYPE_SOCKET;
@@ -2555,6 +2558,8 @@ PP(pp_sockpair)
TAINT_PROPER("socketpair");
if (PerlSock_socketpair_cloexec(domain, type, protocol, fd) < 0)
RETPUSHUNDEF;
+ setfd_inhexec_for_sysfd(fd[0]);
+ setfd_inhexec_for_sysfd(fd[1]);
IoIFP(io1) = PerlIO_fdopen(fd[0], "r" SOCKET_OPEN_MODE);
IoOFP(io1) = PerlIO_fdopen(fd[0], "w" SOCKET_OPEN_MODE);
IoTYPE(io1) = IoTYPE_SOCKET;
@@ -2670,6 +2675,7 @@ PP(pp_accept)
if (fd < 0)
goto badexit;
+ setfd_inhexec_for_sysfd(fd);
if (IoIFP(nstio))
do_close(ngv, FALSE);
IoIFP(nstio) = PerlIO_fdopen(fd, "r" SOCKET_OPEN_MODE);