From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-944548-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 D56FE139694
	for <garchives@archives.gentoo.org>; Mon, 17 Apr 2017 17:25:01 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id CE738E0D26;
	Mon, 17 Apr 2017 17:24:59 +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 AD7A1E0D26
	for <gentoo-commits@lists.gentoo.org>; Mon, 17 Apr 2017 17:24:59 +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 EE8EC33FE7D
	for <gentoo-commits@lists.gentoo.org>; Mon, 17 Apr 2017 17:24:57 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id AB848742B
	for <gentoo-commits@lists.gentoo.org>; Mon, 17 Apr 2017 17:24:55 +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: <1492449825.0e3f8720984d7d5752a78a4135cd268e4f83b3d7.williamh@OpenRC>
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
X-VCS-Repository: proj/openrc
X-VCS-Files: src/rc/openrc-init.c
X-VCS-Directories: src/rc/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: 0e3f8720984d7d5752a78a4135cd268e4f83b3d7
X-VCS-Branch: master
Date: Mon, 17 Apr 2017 17:24:55 +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: 5c2942a0-084e-4bcc-a1c6-febfb3f3be51
X-Archives-Hash: 8f5bbce34c9ded0bb6bbee0024806ecb

commit:     0e3f8720984d7d5752a78a4135cd268e4f83b3d7
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Apr 17 17:23:45 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Apr 17 17:23:45 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=0e3f8720

init: send term/kill signals as final step of shutdown

 src/rc/openrc-init.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/rc/openrc-init.c b/src/rc/openrc-init.c
index 621c81ea..8abe0dd6 100644
--- a/src/rc/openrc-init.c
+++ b/src/rc/openrc-init.c
@@ -96,6 +96,11 @@ static void handle_shutdown(const char *runlevel, int cmd)
 
 	pid = do_openrc(runlevel);
 	while (waitpid(pid, NULL, 0) != pid);
+	printf("Sending the final term signal\n");
+	kill(-1, SIGTERM);
+	sleep(3);
+	printf("Sending the final kill signal\n");
+	kill(-1, SIGKILL);
 	sync();
 	reboot(cmd);
 }