From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 5777C1396D9 for ; Thu, 26 Oct 2017 19:02:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8749F2BC00D; Thu, 26 Oct 2017 19:01:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 68DCE2BC00B for ; Thu, 26 Oct 2017 19:01:59 +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 7258433E4AD for ; Thu, 26 Oct 2017 19:01:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 046A9833 for ; Thu, 26 Oct 2017 19:01:57 +0000 (UTC) From: "William Hubbs" 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" Message-ID: <1509041896.d1491e201d3ad364e25a55b29ff8035775a6acac.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:0.34.x 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: d1491e201d3ad364e25a55b29ff8035775a6acac X-VCS-Branch: 0.34.x Date: Thu, 26 Oct 2017 19:01:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7ed9471b-87aa-4d30-babc-3097c12f3a89 X-Archives-Hash: 7710258b944a8d7c9caa019007b4b07d commit: d1491e201d3ad364e25a55b29ff8035775a6acac Author: William Hubbs gmail com> AuthorDate: Thu Oct 26 17:58:59 2017 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Oct 26 18:18:16 2017 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=d1491e20 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); }