chiark / gitweb /
login: Don't stop a running user manager from garbage-collecting the user.
authorThomas Bächler <thomas@archlinux.org>
Sun, 15 Dec 2013 11:06:37 +0000 (12:06 +0100)
committerTom Gundersen <teg@jklm.no>
Wed, 18 Dec 2013 09:57:13 +0000 (10:57 +0100)
With the current logic, a user will never be garbage-collected, since its
manager will always be around. Change the logic such that a user is
garbage-collected when it has no sessions and linger is disabled.

src/login/logind-user.c

index 6ba8d98..441e086 100644 (file)
@@ -618,12 +618,6 @@ bool user_check_gc(User *u, bool drop_not_started) {
         if (u->service_job && manager_job_is_active(u->manager, u->service_job))
                 return true;
 
-        if (u->slice && manager_unit_is_active(u->manager, u->slice) != 0)
-                return true;
-
-        if (u->service && manager_unit_is_active(u->manager, u->service) != 0)
-                return true;
-
         return false;
 }