summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-12 10:37:55 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-12 10:37:55 +0000
commitc43f8b937804a25598432d2d19d7f04146b29bc2 (patch)
tree52a4c3ddbc7481c3c1add6a6225350c6b36f6453 /util.c
parente8e8ee84602fa907e807fa80c12689426f70adc6 (diff)
downloadperl-c43f8b937804a25598432d2d19d7f04146b29bc2.tar.gz
More microperlish faking in case no fcntl F_SETFD for pipes.
p4raw-id: //depot/perl@20644
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.c b/util.c
index 9a43d67fa0..ea0c43eb1b 100644
--- a/util.c
+++ b/util.c
@@ -1819,6 +1819,8 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
#if defined(HAS_FCNTL) && defined(F_SETFD)
/* Close error pipe automatically if exec works */
fcntl(pp[1], F_SETFD, FD_CLOEXEC);
+#else
+ PerlLIO_close(pp[1]); /* Do as best as we can: pretend success. */
#endif
}
/* Now dup our end of _the_ pipe to right position */
@@ -1958,6 +1960,8 @@ Perl_my_popen(pTHX_ char *cmd, char *mode)
PerlLIO_close(pp[0]);
#if defined(HAS_FCNTL) && defined(F_SETFD)
fcntl(pp[1], F_SETFD, FD_CLOEXEC);
+#else
+ PerlLIO_close(pp[1]); /* Do as best as we can: pretend success. */
#endif
}
if (p[THIS] != (*mode == 'r')) {