From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-946920-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 45473139696
	for <garchives@archives.gentoo.org>; Sat, 29 Apr 2017 22:56:13 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id D1E31E0DC8;
	Sat, 29 Apr 2017 22:56:11 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id AEE78E0DC8
	for <gentoo-commits@lists.gentoo.org>; Sat, 29 Apr 2017 22:56:11 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 6B7A6341301
	for <gentoo-commits@lists.gentoo.org>; Sat, 29 Apr 2017 22:56:10 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 7D90C7443
	for <gentoo-commits@lists.gentoo.org>; Sat, 29 Apr 2017 22:56:08 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" <williamh@gentoo.org>
Message-ID: <1493491725.96c8ba2fb5f91a711ef5bfcfd8affe0b74ad18fe.williamh@OpenRC>
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
X-VCS-Repository: proj/openrc
X-VCS-Files: src/rc/supervise-daemon.c
X-VCS-Directories: src/rc/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: 96c8ba2fb5f91a711ef5bfcfd8affe0b74ad18fe
X-VCS-Branch: master
Date: Sat, 29 Apr 2017 22:56:08 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: e3c7846d-8f8f-4f90-8940-113c2b5c6bdb
X-Archives-Hash: d6812e6717b9c23034b8cc8aff880a7d

commit:     96c8ba2fb5f91a711ef5bfcfd8affe0b74ad18fe
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Sat Apr 29 18:48:45 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Apr 29 18:48:45 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=96c8ba2f

supervise-daemon: mark all open file descriptors FD_CLOEXEC

 src/rc/supervise-daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index 2a24799c..2080e4a6 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -322,7 +322,7 @@ static void child_process(char *exec, char **argv)
 		dup2(stderr_fd, STDERR_FILENO);
 
 	for (i = getdtablesize() - 1; i >= 3; --i)
-		close(i);
+		fcntl(i, F_SETFD, FD_CLOEXEC);
 
 	*cmdline = '\0';
 	c = argv;