mirror of https://github.com/neutrinolabs/xrdp
common: set log file fd to close on exec
This commit is contained in:
parent
7695f3d87b
commit
89f449aa01
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue