summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-07-31 16:52:29 +0200
committerSven Eden <yamakuzure@gmx.net>2017-03-14 10:07:22 +0100
commitb5132cc290ef609fb7a84adb8130526fb433c291 (patch)
tree470caedc3ae00d7287e1144c7944d470cc0d81bf
parent329f95e0485eb22e4c869d5d9a8f42e5d4d02eda (diff)
logind: release VT-positions when closing sessions
Make sure we release VT-positions when a session is closed. Otherwise, lingering sessions will occupy VTs and prevent next logins from succeeding. Note that we already release session-devices when closing a session, so there cannot be anyone using the VT anymore.
-rw-r--r--src/login/logind-session.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 8950c7190..30380ae52 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -630,6 +630,9 @@ int session_stop(Session *s, bool force) {
s->timer_event_source = sd_event_source_unref(s->timer_event_source);
+ if (s->seat)
+ seat_evict_position(s->seat, s);
+
/* We are going down, don't care about FIFOs anymore */
session_remove_fifo(s);
@@ -666,6 +669,9 @@ int session_finalize(Session *s) {
s->timer_event_source = sd_event_source_unref(s->timer_event_source);
+ if (s->seat)
+ seat_evict_position(s->seat, s);
+
/* Kill session devices */
while ((sd = hashmap_first(s->devices)))
session_device_free(sd);