summaryrefslogtreecommitdiff
path: root/src/core/scope.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2015-11-16 15:09:55 +0100
committerDavid Herrmann <dh.herrmann@googlemail.com>2015-11-16 15:09:55 +0100
commit44690833dfadb523c1f9b6a9e6e1dced44f374e1 (patch)
tree825ddf05390264473ceda190b668f3d501094d5c /src/core/scope.c
parente25b5a8d7380a86ea717b4038c45a8f882b1a2ae (diff)
parent541ec33075f9f2461b5286592312d2b50295ad32 (diff)
Merge pull request #1886 from poettering/tasks-max
Enable TasksMax by default for all units
Diffstat (limited to 'src/core/scope.c')
-rw-r--r--src/core/scope.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/scope.c b/src/core/scope.c
index 5f6527c155..1953af1f88 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -402,15 +402,10 @@ static bool scope_check_gc(Unit *u) {
/* Never clean up scopes that still have a process around,
* even if the scope is formally dead. */
- if (u->cgroup_path) {
- int r;
+ if (!u->cgroup_path)
+ return false;
- r = cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path);
- if (r <= 0)
- return true;
- }
-
- return false;
+ return cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path) <= 0;
}
static void scope_notify_cgroup_empty_event(Unit *u) {
@@ -577,6 +572,7 @@ const UnitVTable scope_vtable = {
.no_alias = true,
.no_instances = true,
+ .can_transient = true,
.init = scope_init,
.load = scope_load,
@@ -611,7 +607,5 @@ const UnitVTable scope_vtable = {
.bus_set_property = bus_scope_set_property,
.bus_commit_properties = bus_scope_commit_properties,
- .can_transient = true,
-
.enumerate = scope_enumerate,
};