]> git.ipfire.org Git - thirdparty/systemd.git/commit
logind: drop session fifo logic, rely solely on pidfd for exit notification
authorMike Yuan <me@yhndnzj.com>
Wed, 8 Jan 2025 12:50:35 +0000 (13:50 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 18 Apr 2025 19:43:04 +0000 (04:43 +0900)
commit3180c4d46151673a9c985e60f205d4c76a81573f
tree1de04b1a76fc694bc20bf05d829a51121c3262d6
parentf630d17c9ba222216ee11913a3f832e82574fb0f
logind: drop session fifo logic, rely solely on pidfd for exit notification

Traditionally, logind installed a fifo in the PAM session and
used EOF on the fd as signal for session close. With the addition of
pidfd (76f2191d8eb54d7b9e39ab230c9c62b8a8c42265) however,
logind tracks the leader process and the session is terminated
as soon as that exits. I think the new behavior generally makes
more sense, and the behavior got changed *in the mentioned commit
already* without anyone ever showing up to complain. It hence
feels safe to kill the concept now (also before the varlink interface
gets rolled out).

Note that the 'PID' field in CreateSession() Varlink method
is now marked as strict, i.e. failure to acquire pidfd
is immediately treated as fatal.
NEWS
src/login/logind-dbus.c
src/login/logind-session-dbus.c
src/login/logind-session.c
src/login/logind-session.h
src/login/logind-varlink.c
src/login/pam_systemd.c
src/shared/varlink-io.systemd.Login.c