Use FD_CLOEXEC explicitly.

MFC after:	3 days
This commit is contained in:
Sergey Kandaurov 2011-03-30 14:15:18 +00:00
parent 766282cbe7
commit af47829540

View File

@ -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);