ryantimwilson / rpms / systemd

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