From 0af7d5bc204cd6b7d03f22aacf4072c5f526c0ee Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 3 Nov 2008 15:31:01 +0000 Subject: Add a new shutdown runlevel, Gentoo #224537. Split halt.sh into halt, killprocs, romount and savecache services. The reboot runlevel is removed but mapped to shutdown. The halt script should be moved to the sysvinit package. --- src/rc/runscript.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/rc/runscript.c') diff --git a/src/rc/runscript.c b/src/rc/runscript.c index 4fc12bfe..d0557307 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -519,6 +519,9 @@ svc_exec(const char *arg1, const char *arg2) } execok = rc_waitpid(service_pid) == 0 ? true : false; + if (!execok && errno == ECHILD) + /* killall5 -9 could cause this */ + execok = true; service_pid = 0; return execok; @@ -1008,8 +1011,6 @@ svc_stop(bool deps) if (runlevel && (strcmp(runlevel, RC_LEVEL_SHUTDOWN) == 0 || - strcmp(runlevel, - RC_LEVEL_REBOOT) == 0 || strcmp(runlevel, RC_LEVEL_SINGLE) == 0)) continue; -- cgit v1.2.3