r/linux • u/rain5 • May 28 '16
systemd developer asks tmux (and other programs) to add systemd specific code
https://github.com/tmux/tmux/issues/428
359
Upvotes
r/linux • u/rain5 • May 28 '16
View all comments
Show parent comment
3
u/eras May 29 '16
As you mention even in your use case you are relying on the fact that the login shell doesn't send SIGHUP to processes during output, which I don't consider a feature. Use nohup, (&), &|, disown of zsh, screen or tmux to explicitly leave those on the background. Or in the case of system having being configured to kill user processes upon exit, use systemd-run --scope --user. Maybe they should provide their own implementation of nohup.
So let's say you have a buggy piece of software. For example you have exited matlab using D and process remains, spinning CPU at 100% (I guess this bug has been fixed since). It would seem to me it's perfectly sane to kill processes upon logout that haven't been particularly requested to be backgrounded.
And while buggy apps don't necessarily consume 100% CPU, you might find that exiting a session on a typical Linux desktop leaves a bundle of useless processes lingering around for no reason.
It'll be more fun (spectatorwise) when this functionality covers SSH login sessions as well.. :-)