Use FD_CLOEXEC explicitly.
MFC after: 3 days
This commit is contained in:
parent
766282cbe7
commit
af47829540
@ -342,7 +342,7 @@ connectlog(void)
|
||||
if (LogFile == -1) {
|
||||
if ((LogFile = _socket(AF_UNIX, SOCK_DGRAM, 0)) == -1)
|
||||
return;
|
||||
(void)_fcntl(LogFile, F_SETFD, 1);
|
||||
(void)_fcntl(LogFile, F_SETFD, FD_CLOEXEC);
|
||||
}
|
||||
if (LogFile != -1 && status == NOCONN) {
|
||||
SyslogAddr.sun_len = sizeof(SyslogAddr);
|
||||
|
Loading…
Reference in New Issue
Block a user