From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-974403-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 F338A1396D0
	for <garchives@archives.gentoo.org>; Fri, 22 Sep 2017 22:25:55 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0B50E234194;
	Fri, 22 Sep 2017 22:25:55 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id DEC44234194
	for <gentoo-commits@lists.gentoo.org>; Fri, 22 Sep 2017 22:25:53 +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 BC7E6341130
	for <gentoo-commits@lists.gentoo.org>; Fri, 22 Sep 2017 22:25:52 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 9E2D08F9D
	for <gentoo-commits@lists.gentoo.org>; Fri, 22 Sep 2017 22:25:50 +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: <1505771958.1cac8b080c16f9aab19c7a3ae1ca155c20dfa14d.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: 1cac8b080c16f9aab19c7a3ae1ca155c20dfa14d
X-VCS-Branch: master
Date: Fri, 22 Sep 2017 22:25:50 +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: 7228e412-0168-46e1-b5b8-3763a5539485
X-Archives-Hash: 0eea26f5b168c04514f74c9996bb3c2f

commit:     1cac8b080c16f9aab19c7a3ae1ca155c20dfa14d
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Sep 18 21:59:18 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Sep 18 21:59:18 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=1cac8b08

ignore sigchld when shutting down the supervised process

We need to do this to skip the zombie state for the child process since
we are not easily able to wait() for it.

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

diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index 09db1912..a781ad9d 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -753,6 +753,7 @@ int main(int argc, char **argv)
 		while (!exiting) {
 			wait(&i);
 			if (exiting) {
+				signal_setup(SIGCHLD, SIG_IGN);
 				syslog(LOG_INFO, "stopping %s, pid %d", exec, child_pid);
 				nkilled = run_stop_schedule(applet, exec, NULL, child_pid,
 						0, false, false, true);