svn commit: r220321 - stable/7/lib/libc/gen

Sergey Kandaurov pluknet at FreeBSD.org
Mon Apr 4 09:38:05 UTC 2011


Author: pluknet
Date: Mon Apr  4 09:38:05 2011
New Revision: 220321
URL: http://svn.freebsd.org/changeset/base/220321

Log:
  MFC r220157:
  
  Use FD_CLOEXEC explicitly.

Modified:
  stable/7/lib/libc/gen/syslog.c
Directory Properties:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/stdtime/   (props changed)

Modified: stable/7/lib/libc/gen/syslog.c
==============================================================================
--- stable/7/lib/libc/gen/syslog.c	Mon Apr  4 09:36:29 2011	(r220320)
+++ stable/7/lib/libc/gen/syslog.c	Mon Apr  4 09:38:05 2011	(r220321)
@@ -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);


More information about the svn-src-stable mailing list