Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Apr 2011 09:38:05 +0000 (UTC)
From:      Sergey Kandaurov <pluknet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r220321 - stable/7/lib/libc/gen
Message-ID:  <201104040938.p349c5lQ077996@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104040938.p349c5lQ077996>