summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/log.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/log.c b/common/log.c
index e196021a..b3ae9c22 100644
--- a/common/log.c
+++ b/common/log.c
@@ -59,6 +59,13 @@ internal_log_file_open(const char *fname)
S_IRUSR | S_IWUSR);
}
+#ifdef FD_CLOEXEC
+ if (ret != -1)
+ {
+ fcntl(ret, F_SETFD, FD_CLOEXEC);
+ }
+#endif
+
return ret;
}