chiark / gitweb /
execute: improve exec_spawn() logging
[elogind.git] / service.c
index 832c7b326328d6a1429426fe72b94ab7eb95d43c..e5a9658bcfa7784edef26acb0cf17f917998c194 100644 (file)
--- a/service.c
+++ b/service.c
@@ -157,7 +157,10 @@ static int sysv_chkconfig_order(Service *s) {
                 if (t->sysv_start_priority < 0)
                         continue;
 
-                if (s->sysv_has_lsb && t->sysv_has_lsb)
+                /* If both units have modern headers we don't care
+                 * about the priorities */
+                if ((!s->sysv_path || s->sysv_has_lsb) &&
+                    (!t->sysv_path || t->sysv_has_lsb))
                         continue;
 
                 if (t->sysv_start_priority < s->sysv_start_priority)
@@ -845,6 +848,10 @@ static int service_load_pid_file(Service *s) {
                 return -ESRCH;
         }
 
+        if ((r = unit_watch_pid(UNIT(s), (pid_t) p)) < 0)
+                /* FIXME: we need to do something here */
+                return r;
+
         s->main_pid = (pid_t) p;
         s->main_pid_known = true;