chiark / gitweb /
service: consider a process exiting with SIGTERM a clean exit
[elogind.git] / service.c
index c13cf2f5e162fb42da23b0863e4fb81049989d24..bf91561901f03d3fb8c23769049148962fdaeefa 100644 (file)
--- a/service.c
+++ b/service.c
@@ -591,14 +591,6 @@ static int service_load_sysv_path(Service *s, const char *path) {
                 }
         }
 
-        /* If init scripts have no LSB header, then we enforce the
-         * ordering via the chkconfig priorities. We try to determine
-         * a priority for *all* init scripts here, since they are
-         * needed as soon as at least one non-LSB script is used. */
-
-        if (s->sysv_start_priority < 0)
-                log_warning("%s has neither a chkconfig header nor a directory link, cannot order unit!", u->meta.id);
-
         if ((r = sysv_exec_commands(s)) < 0)
                 goto finish;
 
@@ -1898,7 +1890,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
         assert(s);
         assert(pid >= 0);
 
-        success = code == CLD_EXITED && status == 0;
+        success = is_clean_exit(code, status);
         s->failure = s->failure || !success;
 
         if (s->main_pid == pid) {