summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-11-06 20:49:08 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-11-06 20:49:08 -0800
commit04ac2824f9fa74583548b0cd58097d550a09b22a (patch)
tree447d33331013510c7a8843e49622c0db245b32d4 /stream.c
parent182e6a1b3bee42f203aa70ffe1675c3be7ef59fa (diff)
downloadtxr-04ac2824f9fa74583548b0cd58097d550a09b22a.tar.gz
txr-04ac2824f9fa74583548b0cd58097d550a09b22a.tar.bz2
txr-04ac2824f9fa74583548b0cd58097d550a09b22a.zip
open-process: close-on-exec bugfix.
This is a regression introduce in the 2019-06-09 commit 4f33b169dc547b7f9af6f2f1c173d36fc4d62fe8 "Adding fcntl interface." which changed HAVE_FCNTL_H to HAVE_FCNTL in the configure script, without making the same change in stream.c. * stream.c: Replace HAVE_FCNTL_H with the correct HAVE_FCNTL, so that we're once again actually including the <fcntl.h> header now, and setting the close-on-exec flag on the pipe in open-process.
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stream.c b/stream.c
index a57f9280..0993ef97 100644
--- a/stream.c
+++ b/stream.c
@@ -43,7 +43,7 @@
#ifdef __CYGWIN__
#include <sys/utsname.h>
#endif
-#if HAVE_FCNTL_H
+#if HAVE_FCNTL
#include <fcntl.h>
#endif
#include <float.h>
@@ -4126,7 +4126,7 @@ val open_process(val name, val mode_str, val args)
free(argv[i]);
free(argv);
-#if HAVE_FCNTL_H
+#if HAVE_FCNTL
fcntl(whichfd, F_SETFD, FD_CLOEXEC);
#endif