On Tue, 31.05.16 11:31, Gerd Hoffmann (kraxel(a)redhat.com) wrote:
IMO systemd should allow to specify the KillUserProcesses policy
separately for processes with/without controlling terminal. So you
could ask systemd to zap any gnome process going wild on logout without
breaking screen and tmux.
Again, as mentioned before: key here is that permitting user processes
to stick around after all sessions of the user ended needs to be a
privilieged concept. It should not be allowed for user code to stick
around after logout, unless this is explicitly permitted by the admin,
and this hence needs to be enforced by privileged code.
Hence, whether a process reacts to SIGHUP or SIGTERM or not is not
suitable at all as indication on whether to permit them to stay around
or not, because that's something that is exclusively up to the
processes themselves, and requires no privileges at all to make use of.
Lennart Poettering, Red Hat