diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-31 16:52:29 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-07-31 16:52:29 +0200 |
commit | 10189fd6be0f547d75bc857860f3ecbbdbc447a6 (patch) | |
tree | 391700939961c985857466986161bcb83186afb7 /src | |
parent | b506d3141b97d0a3fbda461f4b8d9d64f46408d1 (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.
Diffstat (limited to 'src')
-rw-r--r-- | src/login/logind-session.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 2537d02845..9a2da7906e 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -636,6 +636,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); @@ -672,6 +675,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); |