diff options
Diffstat (limited to 'src/logind-session.c')
-rw-r--r-- | src/logind-session.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/logind-session.c b/src/logind-session.c index 7671850003..088e956bfc 100644 --- a/src/logind-session.c +++ b/src/logind-session.c @@ -473,6 +473,7 @@ static int session_create_cgroup(Session *s) { STRV_FOREACH(k, s->manager->controllers) { if (strv_contains(s->reset_controllers, *k) || + strv_contains(s->manager->reset_controllers, *k) || strv_contains(s->controllers, *k)) continue; @@ -489,6 +490,18 @@ static int session_create_cgroup(Session *s) { log_warning("Failed to reset controller %s: %s", *k, strerror(-r)); } + + STRV_FOREACH(k, s->manager->reset_controllers) { + + if (strv_contains(s->reset_controllers, *k) || + strv_contains(s->controllers, *k)) + continue; + + r = cg_attach(*k, "/", s->leader); + if (r < 0) + log_warning("Failed to reset controller %s: %s", *k, strerror(-r)); + + } } hashmap_put(s->manager->cgroups, s->cgroup_path, s); |