4 ms·
The processes the user wants to stop should stop and the ones they want to keep running should keep running. There is enough demand for this capability that the
by gaius 10y ago
The processes the user wants to stop should stop and the ones they want to keep running should keep running. There is enough demand for this capability that there are multiple ways to do it, from disown in the shell, to cron/at, to screen/tmux/emacs and probably more besides.
- kuschku 10y agoYes, and the answer for that is systemd-run. Systemd’s change is just "processes have to explicitly declare they are long-running, or they’ll be killed". How else would you do it?
- gaius 10y agohttps://en.wikipedia.org/wiki/GNU_Screen#History https://en.wikipedia.org/wiki/GNU_Screen#History
- Sanddancer 10y agoBy using the unix tools that have existed since forever and a day. Detatching from the user's session. If a program is broken and doesn't die when it's supposed to, fix the program, not every other program that behaves correctly with functionality that's been around for decades.
- kuschku 10y agoAnd that’s exactly the opposite of how you build efficient and secure systems. This is basically sandboxing time itself. The bad software will never be fixed. Never. But you can put it in a jail, and let the user configure that good software won’t have that jail.
- Sanddancer 10y agoThe bad software will update itself to continue being bad using the new mechanisms that systemd provides to allow it to be bad. By spending efforts to fix the bad software, or to write better software, you will do much greater things than to break the multitude of software that behaves correctly.
- rkeene2 10y agoIt likely already does "the right thing" according to POSIX. tmux starts a server and then immediately connects to it a client. The server portion is what's being erroneously killed. Starting a server is a relatively normal thing, and one of the steps is to create a new session. setsid() is how you do that. Systemd shouldn't kill processes in a separate session.