common: set log file fd to close on exec
This commit is contained in:
@@ -59,6 +59,13 @@ internal_log_file_open(const char *fname)
|
|||||||
S_IRUSR | S_IWUSR);
|
S_IRUSR | S_IWUSR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FD_CLOEXEC
|
||||||
|
if (ret != -1)
|
||||||
|
{
|
||||||
|
fcntl(ret, F_SETFD, FD_CLOEXEC);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user