mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
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.
This commit is contained in:
parent
b506d3141b
commit
10189fd6be
@ -636,6 +636,9 @@ int session_stop(Session *s, bool force) {
|
|||||||
|
|
||||||
s->timer_event_source = sd_event_source_unref(s->timer_event_source);
|
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 */
|
/* We are going down, don't care about FIFOs anymore */
|
||||||
session_remove_fifo(s);
|
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);
|
s->timer_event_source = sd_event_source_unref(s->timer_event_source);
|
||||||
|
|
||||||
|
if (s->seat)
|
||||||
|
seat_evict_position(s->seat, s);
|
||||||
|
|
||||||
/* Kill session devices */
|
/* Kill session devices */
|
||||||
while ((sd = hashmap_first(s->devices)))
|
while ((sd = hashmap_first(s->devices)))
|
||||||
session_device_free(sd);
|
session_device_free(sd);
|
||||||
|
Loading…
Reference in New Issue
Block a user