From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-980547-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 38BD71396D9
	for <garchives@archives.gentoo.org>; Thu, 26 Oct 2017 18:58:30 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A3A7F2BC00D;
	Thu, 26 Oct 2017 18:58:29 +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 7D7F42BC00B
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Oct 2017 18:58:29 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(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 9F94033FE60
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Oct 2017 18:58:27 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 441ED832
	for <gentoo-commits@lists.gentoo.org>; Thu, 26 Oct 2017 18:58:26 +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: <1509040739.667a09983ca5311824aa88c42d39a495c540fc4c.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: 667a09983ca5311824aa88c42d39a495c540fc4c
X-VCS-Branch: master
Date: Thu, 26 Oct 2017 18:58:26 +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: 8db5d17a-f886-450e-8a97-99b6f1707033
X-Archives-Hash: e1b68478d40a3a605c064e895317602f

commit:     667a09983ca5311824aa88c42d39a495c540fc4c
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Oct 26 17:58:59 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Oct 26 17:58:59 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=667a0998

supervise-daemon: remove child_pid from saved options during shutdown

This allows us to detect when the supervisor dies unexpectedly because
in that case child_pid will still exist.

 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 998a01bc..b232e215 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -523,6 +523,7 @@ static void supervisor(char *exec, char **argv)
 		rc_service_daemon_set(svcname, exec, (const char *const *)argv,
 				pidfile, false);
 		rc_service_mark(svcname, RC_SERVICE_STOPPED);
+		rc_service_value_set(svcname, "child_pid", NULL);
 	}
 	exit(EXIT_SUCCESS);
 }