diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-23 12:41:05 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-07-23 16:08:07 +0200 |
commit | c20b8dad71bf4716471237776291534c593904cd (patch) | |
tree | f3a8cd108f06d2c7d119e226caff3505cfcd817e /src/login | |
parent | 9f18eda8ffa5d60176f0cb9251dc85e708bedd0d (diff) | |
download | systemd-c20b8dad71bf4716471237776291534c593904cd.tar.gz |
logind: don't unlink session fifo when exiting logind
Let's only close our fds, but not unlink it. That's done when the
session is stopped.
This should make sure the fd will survive daemon restarts.
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/logind-session.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 5658ba7c68..7e8025a0ea 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -96,8 +96,6 @@ Session* session_free(Session *s) { s->timer_event_source = sd_event_source_unref(s->timer_event_source); - session_remove_fifo(s); - session_drop_controller(s); while ((sd = hashmap_first(s->devices))) @@ -145,7 +143,13 @@ Session* session_free(Session *s) { hashmap_remove(s->manager->sessions, s->id); + sd_event_source_unref(s->fifo_event_source); + safe_close(s->fifo_fd); + + /* Note that we remove neither the state file nor the fifo path here, since we want both to survive + * daemon restarts */ free(s->state_file); + free(s->fifo_path); return mfree(s); } |