summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-24 17:52:58 +0100
committerLennart Poettering <lennart@poettering.net>2017-02-24 17:52:58 +0100
commitb4cccbc13ad6f98bd8e816ce5fffb99f5be74c8c (patch)
tree14313f0bd5cd2dad79fda852663d9038f81a35ad /src/core/unit.c
parentfc9ae7178e1462377b272a14b1a763d480ab0980 (diff)
cgroup: change cg_unified() to possibly return errors again
We use our cgroup APIs in various contexts, including from our libraries sd-login, sd-bus. As we don#t control those environments we can't rely that the unified cgroup setup logic succeeds, and hence really shouldn't assert on it. This more or less reverts 415fc41ceaeada2e32639f24f134b1c248b9e43f.
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 685df6f00d..91f49aa210 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3897,7 +3897,7 @@ int unit_kill_context(
* there we get proper events. Hence rely on
* them.*/
- if (cg_unified(SYSTEMD_CGROUP_CONTROLLER) ||
+ if (cg_unified(SYSTEMD_CGROUP_CONTROLLER) > 0 ||
(detect_container() == 0 && !unit_cgroup_delegate(u)))
wait_for_exit = true;