diff options
author | Abigail <abigail@abigail.be> | 2018-01-18 17:11:15 +0100 |
---|---|---|
committer | Abigail <abigail@abigail.be> | 2018-01-18 18:30:41 +0100 |
commit | 523d71b314dc75bd212794cc8392eab8267ea744 (patch) | |
tree | af9674cab1b09d49407f5220121f0f38cbcebd04 /toke.c | |
parent | 408956da6c7e0cd9dd2443723d668230c6d6675a (diff) | |
download | perl-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 'toke.c')
-rw-r--r-- | toke.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7669,6 +7669,11 @@ Perl_yylex(pTHX) if (!GvIO(gv)) GvIOp(gv) = newIO(); IoIFP(GvIOp(gv)) = PL_rsfp; + { + const int fd = PerlIO_fileno(PL_rsfp); + if (fd >= 3) + setfd_cloexec(fd); + } /* Mark this internal pseudo-handle as clean */ IoFLAGS(GvIOp(gv)) |= IOf_UNTAINT; if ((PerlIO*)PL_rsfp == PerlIO_stdin()) |