chiark / gitweb /
modules-load: filter out double modules
[elogind.git] / src / service.c
index 8f827aa520a0ffce73ef08d71feab822356696a0..5050bcafa1e993553b7979ba5e3195340f43ea10 100644 (file)
@@ -1270,7 +1270,7 @@ static int service_load_pid_file(Service *s) {
         assert(s);
 
         if (!s->pid_file)
-                return 0;
+                return -ENOENT;
 
         if ((r = read_one_line_file(s->pid_file, &k)) < 0)
                 return r;
@@ -2585,7 +2585,7 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
                 /* Forking services may occasionally move to a new PID.
                  * As long as they update the PID file before exiting the old
                  * PID, they're fine. */
-                if (s->pid_file && service_load_pid_file(s) == 0)
+                if (service_load_pid_file(s) == 0)
                         return;
 
                 s->main_pid = 0;