5 ms·
From the logind.conf man page [1]: > KillUserProcesses= > Takes a boolean argument. Configures whether the processes of a user should be killed when the user
by ciupicri 4y ago
From the logind.conf man page [1]:
> KillUserProcesses=
> Takes a boolean argument. Configures whether the processes of a user should be killed when the user logs out. If true, the scope unit corresponding to the session and all processes inside that scope will be terminated. If false, the scope is "abandoned", see systemd.scope(5), and processes are not killed. Defaults to "no", but see the options KillOnlyUsers= and KillExcludeUsers= below.
> In addition to session processes, user process may run under the user manager unit user@.service. Depending on the linger settings, this may allow users to run processes independent of their login sessions. See the description of enable-linger in loginctl(1).
> Note that setting KillUserProcesses=yes will break tools like screen(1) and tmux(1), unless they are moved out of the session scope. See example in systemd-run(1).
[1]: https://www.freedesktop.org/software/systemd/man/logind.conf.html https://www.freedesktop.org/software/systemd/man/logind.conf...
- gorgoiler 4y agoAhhh, thanks. Now you mention it, wasn’t there some major scandal about this when it first shipped?
- Nursie 4y agoThere were a lot of noises made about it, yes, because people had been "nohup"ing things for decades, and using stuff like screen and tmux to keep sessions going over poor connections. All of a sudden, without much warning, someone made the decision to kill all user processes on logout. It broke a lot of folks workflow.
- SahAssar 4y agoThe "scandal" was the exact opposite of your complaint. People where SSHing in, starting a screen/tmux, disconnecting and complaining about the process being killed.
- wtallis 4y agoNot really an exact opposite. There was a preexisting convention for how to intentionally keep a process running after logout, which systemd broke. That's quite different from a case of a background process the user did not explicitly ask to be started in the first place, let alone flag to keep running after logout.
- rainbow29822 4y agoYou mean the distros broke it by not toggling that option. As you can read from the parent comment here, that "convention" was also broken and causes issues in Debian. There's no solution here that isn't going to break something, that's why the best systemd can do is ship a toggle and tell the distros to figure it out.