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/Lennartwareparty May 29 '16
You already know that, again, HUP is sent to all processes that have a controlling terminal when it dies, every process to a connected session is also notified.
When a process survives logout it's because the user some-how nohupped it and detached its controlling terminal, that is intentional.
We're talking about a hypothetical situation where users are not allowed processes at all if they are not logged in. The current situation covers the case of users intentionally keeping processes after logout quite well. systemd replaced
nohupwithsystemd-runand called it good.This is the current situation.
Any process attached to a controlling terminal will be sent HUP when that terminal dies.
Can a process ignore HUP or otherwise misbehave? Yes. just as processes can misbehave with
systemd-runand call that when they shouldn't. The current system in place has ample methods to allow processes that play nicely to clean themselves up after logout and not unintentionally linger, if a process lingers there are two explanations:Either is still possible with systemd's method.