chiark / gitweb /
systemctl: hide all information on --kill-mode= since it is mostly useless
[elogind.git] / src / logind-user.c
index 177e88200a9f49d4309a1dd621eb496faffe2aa5..dacf148f7829e603c2224447408054e8cb052a58 100644 (file)
@@ -246,6 +246,10 @@ static int user_create_cgroup(User *u) {
         u->cgroup_path = p;
 
         STRV_FOREACH(k, u->manager->controllers) {
+
+                if (strv_contains(u->manager->reset_controllers, *k))
+                        continue;
+
                 r = cg_create(*k, p);
                 if (r < 0)
                         log_warning("Failed to create cgroup %s:%s: %s", *k, p, strerror(-r));
@@ -453,12 +457,15 @@ int user_get_idle_hint(User *u, dual_timestamp *t) {
         return idle_hint;
 }
 
-int user_check_gc(User *u) {
+int user_check_gc(User *u, bool drop_not_started) {
         int r;
         char *p;
 
         assert(u);
 
+        if (drop_not_started && !u->started)
+                return 0;
+
         if (u->sessions)
                 return 1;