chiark / gitweb /
service: properly handle if the main process is down and we wait for the cgroup to...
[elogind.git] / src / manager.c
index ff1c70b4845762446c80382b1051a528aa0e7962..e2f13b20ec52d2913fceac70e5f10f00b99dc237 100644 (file)
@@ -2591,17 +2591,10 @@ bool manager_unit_pending_inactive(Manager *m, const char *name) {
         assert(name);
 
         /* Returns true if the unit is inactive or going down */
-
         if (!(u = manager_get_unit(m, name)))
                 return true;
 
-        if (UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u)))
-                return true;
-
-        if (u->meta.job && u->meta.job->type == JOB_STOP)
-                return true;
-
-        return false;
+        return unit_pending_inactive(u);
 }
 
 static const char* const manager_running_as_table[_MANAGER_RUNNING_AS_MAX] = {