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
8
u/Lennartwareparty May 29 '16 edited May 29 '16
Why is that a 'dumb idea'?
Of course processes continue to run, this is like expecting the world to stop existing when you don't look out of your window any more.
A login session of whatever kind you open on a machine is a conduit between you and the machine to communicate and interact and give it commands, after you are done giving it commands you log out, a lot of stuff can and will run without requiring your constant commands. I have no idea why this is such an unintuitive idea to so many people.
I'm typing this on a notebook, on my desktop right now no one is logged in, why? Because nothing needs to interact with it. Yet it's playing music, that's one process that's running. When I change the track I interact over a SSH forward tunnel which creates a super short login to interact and then logs out again, it would be really dumb if the program that plays the music would then suddenly quit after the interaction is done.
Here, I open a super short login to that computer to interact with it via SSH and demand a listing of all processes running under my user.
Some of those processes lie the
psone is obviously created by the short login. But what do we have here:runsvdir, this is the service manager I use to manage processes as a user, in fact most processes you see there are some-how the cause of that thing:runsv, these are small helper processes that this service manager spawns to supervise processesmpd, this is my music playing server, managed by thatmpdas, the client that connects to it and scrobbles to last.fmmount-tunneluses internally to keep track of its mounts.So please, tell me, why is this a dumb idea, why should those processes some-how be killed? Not every process is interactive. And those that are will be killed because they are either connected to the X session or a controlling terminal so are notified when you log out and kill themselves, unless they are bugged.