diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-08 02:52:52 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-08 02:52:52 +0000 |
commit | 4771b018b5cdc984c08bd1fd014895ea804ec3f0 (patch) | |
tree | d7dbd29220af60de0b50dec1fcdfed3ada62e856 /pp_sys.c | |
parent | 4a76a316da914ce6cc5c2d7af1dfcd312f3ea6db (diff) | |
download | perl-4771b018b5cdc984c08bd1fd014895ea804ec3f0.tar.gz |
set close-on-exec bit on pipe() FDs
p4raw-id: //depot/perl@2215
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -572,7 +572,10 @@ PP(pp_pipe_op) else PerlLIO_close(fd[1]); goto badexit; } - +#if defined(HAS_FCNTL) && defined(F_SETFD) + fcntl(fd[0],F_SETFD,fd[0] > PL_maxsysfd); /* ensure close-on-exec */ + fcntl(fd[1],F_SETFD,fd[1] > PL_maxsysfd); /* ensure close-on-exec */ +#endif RETPUSHYES; badexit: |