core: fix oneshot service resource control

Oneshot services's cgroup is removed when the service
exits. An assert is hit otherwise.
This commit is contained in:
Umut Tezduyar Lindskog
2014-07-15 10:08:01 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent c0a67aef31
commit 285cd771cb
+2 -1
View File
@@ -2542,7 +2542,8 @@ void manager_check_finished(Manager *m) {
}
SET_FOREACH(u, m->startup_units, i)
cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
if (u->cgroup_path)
cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
bus_manager_send_finished(m, firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec);