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
1
u/totallyblasted May 29 '16 edited May 29 '16
And this is exactly what this is about... how do I know which ones are legit and which ones are not? (aka. which ones user really wanted to run in background and it is right to do so). What you did is just straight forward mass murder of all users tasks.
Sorry to burst your bubble, but this is preschool solution that only solves one problem by creating even bigger one (aka. looking at the problem with eyes wide shut). Next thing I guess you'll also be posting solution to whitelist, which is even more terrible hack than this. You basically did the same as if you'd be burning and tried to stop that... by jumping into acid
It is much simpler and more correct to simply enforce policy where command that wants to be running in background tells it so explicitly instead of environment guessing what software wants and intends. With policy like that, no guessing is involved. And if you checked that link you'd see it is just 2 commends one needs to do it properly
The day I put something like this in any of my scripts will probably be my last day on earth since I'll commit seppuku out of shame
Update: And before you start spewing about signals... whole damn lot of software doesn't handle them properly. People can do really stupid things unless someone really holds their hand. Case and point example would be Hyper-V patch that was sent to kernel (where the guy actually called
/etc/init.d/network start|stop... from kernel code, you should really read the developers explanation why he did that... TLDR; "It works this way"). And if that patch was not up to review on kernel maintainers, we can safely say this is exactly how it would be. Someone simply has to enforce right policy from get go. In case of most applications, no one really holds developers hands. And this is why initial confinement into "do it properly or bust" is needed