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); }