naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
572a44
From 85e0484fedb9f4cf0220e19a5207a3923326fb7f Mon Sep 17 00:00:00 2001
572a44
From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
572a44
Date: Sun, 15 Dec 2013 12:06:37 +0100
572a44
Subject: [PATCH] login: Don't stop a running user manager from
572a44
 garbage-collecting the user.
572a44
572a44
With the current logic, a user will never be garbage-collected, since its
572a44
manager will always be around. Change the logic such that a user is
572a44
garbage-collected when it has no sessions and linger is disabled.
572a44
572a44
Conflicts:
572a44
	src/login/logind-user.c
572a44
---
572a44
 src/login/logind-user.c | 6 ------
572a44
 1 file changed, 6 deletions(-)
572a44
572a44
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
572a44
index adbe638..e2fce5c 100644
572a44
--- a/src/login/logind-user.c
572a44
+++ b/src/login/logind-user.c
572a44
@@ -629,12 +629,6 @@ int user_check_gc(User *u, bool drop_not_started) {
572a44
         if (u->slice_job || u->service_job)
572a44
                 return 1;
572a44
 
572a44
-        if (u->slice && manager_unit_is_active(u->manager, u->slice) != 0)
572a44
-                return 1;
572a44
-
572a44
-        if (u->service && manager_unit_is_active(u->manager, u->service) != 0)
572a44
-                return 1;
572a44
-
572a44
         return 0;
572a44
 }
572a44