Fix PAM sessions when pam_systemd is used
Status: Beta
Brought to you by:
jsorg71
For details, see this Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=821569
Essentially, fork another process to execute startwm.sh and leave its parent to close the PAM session. This way, the O_CLOEXEC flag set on the FIFO FD that pam_systemd keeps open to systemd-logind isn't going to cause the FD to get EOF on the systemd-logind side and the session will stay open.
Add a fork to satisfy systemd-logind