|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
From 5ad965069574badd35f79ecb8e6def133de8bd8b Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
From: Umut Tezduyar Lindskog <umut.tezduyar@axis.com>
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
Date: Tue, 15 Jul 2014 08:36:29 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
Subject: [PATCH] core: fix oneshot service resource control
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
Oneshot services's cgroup is removed when the service
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
exits. An assert is hit otherwise.
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
(cherry picked from commit 285cd771cbe275265e165bdb5650b92b31eeab47)
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
src/core/manager.c | 3 ++-
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
diff --git a/src/core/manager.c b/src/core/manager.c
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
index 0cb2044325..edcde31ec1 100644
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
--- a/src/core/manager.c
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
+++ b/src/core/manager.c
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
@@ -2539,7 +2539,8 @@ void manager_check_finished(Manager *m) {
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
SET_FOREACH(u, m->startup_units, i)
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
- cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
+ if (u->cgroup_path)
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
+ cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m));
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
bus_manager_send_finished(m, firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec);
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|