seatd: Close cur_ttyfd in seat_destroy
This fd would only still be set after closing clients if no clients were active on the current VT.
This commit is contained in:
parent
cedd64c283
commit
e173691cfd
1 changed files with 3 additions and 1 deletions
|
@ -19,6 +19,8 @@
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
|
||||||
static int seat_close_client(struct client *client);
|
static int seat_close_client(struct client *client);
|
||||||
|
static void vt_close(struct seat *seat);
|
||||||
|
|
||||||
|
|
||||||
struct seat *seat_create(const char *seat_name, bool vt_bound) {
|
struct seat *seat_create(const char *seat_name, bool vt_bound) {
|
||||||
struct seat *seat = calloc(1, sizeof(struct seat));
|
struct seat *seat = calloc(1, sizeof(struct seat));
|
||||||
|
@ -49,7 +51,7 @@ void seat_destroy(struct seat *seat) {
|
||||||
assert(client->seat == seat);
|
assert(client->seat == seat);
|
||||||
client_destroy(client);
|
client_destroy(client);
|
||||||
}
|
}
|
||||||
assert(seat->cur_ttyfd == -1);
|
vt_close(seat);
|
||||||
linked_list_remove(&seat->link);
|
linked_list_remove(&seat->link);
|
||||||
free(seat->seat_name);
|
free(seat->seat_name);
|
||||||
free(seat);
|
free(seat);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue