summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorUmut Tezduyar Lindskog <umut.tezduyar@axis.com>2014-07-15 08:36:29 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-15 10:08:01 -0400
commit285cd771cbe275265e165bdb5650b92b31eeab47 (patch)
tree084fec4b476d33bc67f3217989fb256de3b7ed87 /src/core/manager.c
parentc0a67aef31bb9716617ffe150ca8be19c5df203e (diff)
core: fix oneshot service resource control
Oneshot services's cgroup is removed when the service exits. An assert is hit otherwise.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 3dffbe259b..e7a3a2a193 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -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);