summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2015-09-27 01:25:07 -0700
committerJay Sorg <jay.sorg@gmail.com>2015-09-27 01:25:07 -0700
commit89f449aa01c1fb787ea6ed4ccca237114c8f85b0 (patch)
tree94afa5a761d0df1bd91dc21d4f0db9c23ad54c93 /common
parent7695f3d87b33c7e5b4c19e4b65f53bfd2e4a0912 (diff)
downloadxrdp-proprietary-89f449aa01c1fb787ea6ed4ccca237114c8f85b0.tar.gz
xrdp-proprietary-89f449aa01c1fb787ea6ed4ccca237114c8f85b0.zip
common: set log file fd to close on exec
Diffstat (limited to 'common')
-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;
}