diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2015-09-27 01:25:07 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2015-09-27 01:25:07 -0700 |
commit | 89f449aa01c1fb787ea6ed4ccca237114c8f85b0 (patch) | |
tree | 94afa5a761d0df1bd91dc21d4f0db9c23ad54c93 /common | |
parent | 7695f3d87b33c7e5b4c19e4b65f53bfd2e4a0912 (diff) | |
download | xrdp-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.c | 7 |
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; } |