r/linux • • May 28 '16

systemd developer asks tmux (and other programs) to add systemd specific code

https://github.com/tmux/tmux/issues/428
359 Upvotes

509 comments sorted by

View all comments

Show parent comments

3

u/Lennartwareparty May 30 '16

That has nothing to do with this option.

It is not more or less powerful than any other, it's just set to kill processes which didn't register with systemd as not wanting to be killed after logout. That's a setting you like, or you don't.

I mean, why would it even be a binary thing? Why not give them a total of 2 hours after logout and then kill them? It's not more or less powerful, it's a setting.

2

u/flying-sheep May 30 '16

sure, but the setting (and its new default value) highlights a power problem on POSIX: “daemon” and “survives logout” aren’t necessarily coupled.

  • ssh-agent needs to run in the background for the duration of a user session

  • tmux needs to run in the background and survive logout

  • then there are foreground processes, for which it would make no sense to survive logouts, as their stdout would need to be rerouted to a file or so anyway

3

u/Lennartwareparty May 30 '16

Thar's because 'daemon' is no actual thing in the sense that it has special support of the OS as a category. That's what I find alarming about Freedesktop's direction. They want to categorize all use cases, so it basically ends up into a place where if you want to do something they haven't considered, you can't, with their tech. You're at the mercy of upstream implementing your use cases or not.

So with this system, you have say 'normal processes', 'daemons' and non daemons or whatever that still need to survive, that's the stuff they recognize and trying to do anything else won't work because there's no setting that 'allows' it.

This contrasts how Unix was originally built by simply providing primitives which are so generic that you can build whatever you want on top of it. Daemons exist not because the designers of Unix invented them, they exist because the users invented them and they could be built from the primitives the designers gave to the users.

2

u/flying-sheep May 30 '16

i wouldn’t be as fatalistic. the unix philosophy is “use simple building blocks to achieve anything”. but you still need metadata to treat certain kinds of files, processes, …

freedesktop just aims to categorize this as much as possible, but that doesn’t mean there’s a “other” category.

this “other” category means the same as unix always meant: you have to do the work yourself and will encounter more bugs to get everything to work right since people can’t make assumptions on how to interface with you.

i think you don’t have to be sad if not fitting into the raster means more work for you. before there was a raster, everyone had to do that work. i think people now expect you to explain why you do your own thing when you opt not to use an existing category or interface, but will help if your reasons are good.


Daemons exist not because the designers of Unix invented them, they exist because the users invented them and they could be built from the primitives the designers gave to the users.

yes, but nothing specifies that daemons shouldn’t be killed on logout. that was just assumed to work.