diff options
author | Roy Marples <roy@marples.name> | 2008-11-03 15:31:01 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-11-03 15:31:01 +0000 |
commit | 0af7d5bc204cd6b7d03f22aacf4072c5f526c0ee (patch) | |
tree | aa819c4140f8c34bd3814ae5894a8b6214fff914 /src/rc/runscript.c | |
parent | 895c4f41492199d6aee75bb6c5a935134d67c29e (diff) |
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.
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r-- | src/rc/runscript.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; @@ -1009,8 +1012,6 @@ svc_stop(bool deps) (strcmp(runlevel, RC_LEVEL_SHUTDOWN) == 0 || strcmp(runlevel, - RC_LEVEL_REBOOT) == 0 || - strcmp(runlevel, RC_LEVEL_SINGLE) == 0)) continue; rc_service_mark(service, RC_SERVICE_FAILED); |