7 ms·
This is yet another example of pointless incidental complexity in systemd. The whole point of "nohup"-based tools like tmux and screen is to cleanly separate th
by zozbot234 7y ago
This is yet another example of pointless incidental complexity in systemd. The whole point of "nohup"-based tools like tmux and screen is to cleanly separate the management of user sessions from the incidental mechanism of whether a remote connection is being closed (the 'HUP' in nohup is short for "hang up" i.e. close a [possibly remote] connection). Systemd should simply acknowledge this fact and keep the user session going when a program has been launched under nohup, instead it tightly couples its own "session" concept to the remote connection and then adds a totally ad-hoc, hacked-together feature called EnableLinger to somehow make nohup work anyway. It's amazing.
- pknopf 7y agoI'm not seeing a lot of hope here. There is an incredible investment in systemd by distributions, there is no turning back. Help me..
- BeetleB 7y agoGentoo is reaching out to you.
- vpzom 7y agoOr if you don't want to go source-based, maybe Void or Alpine
- edoceo 7y agoOpenRC, it's available on some Linux distros.
- a-nikolaev 7y agoVoid Linux, amazingly awesome distro.
- wrycoder 7y agoDevuan.org
- kelnos 7y agoI still don't entirely get the point of Devuan. I put Debian buster on a low-RAM embedded box, and since systemd eats up precious RAM I'd rather keep, I just switched to OpenRC with apt install openrc && apt purge systemd If I needed it, Debian packages elogind as well. Rebooted and it worked perfectly. Now, I get that Debian doesn't really support OpenRC[0] (or sysvinit), and it could break in horrible ways when bullseye goes stable, or get removed entirely, but... I don't see why we need a fork before that happens? It seems like it's a lot of work to maintain a distro fork, when I feel like that effort could be more productively redirected to stronger maintenance and advocacy of OpenRC and/or sysvinit in Debian itself? [0] Debian's openrc package hasn't been updated in a little over a year, which is indeed concerning. sysvinit does seem to be more actively maintained, though.
- wrycoder 7y agoLate reply, sorry. The problem isn't systemd's init. It's probably fine. The problem is the systemd project is taking over the userspace with mutually cross-linked modules. Devuan was started by a group of Debian maintainers who disagreed with the direction systemd was taking Debian.
- spindle 7y agoMy bet is that it depends on whether NixOS or Guix takes over the world. (And my bet within a bet is that it will be NixOS.)
- JChase2 7y agoSlackware doesn't use it, and Patrick Volkerding recently got a Patreon account set up so Slackware 15.0 or 14.3 will hopefully be out soonish with updated packages. I'm writing this on 14.2 and have been running it since it came out with basically no issues. Also have it on a backup server, runs great.
- enriquto 7y agoI love slack. There's something extremely beautiful in launching htop and seeing less than 10 processes (including those of root).
- lawnchair_larry 7y agoBut it’s 2020, and we need package management.
- JChase2 7y agoUse Alpine or something then. I use Alpine as well on a server, OpenBSD on a server, slackware on a server, slackware on my laptop... There's some options. We even use Devuan to host OP's essay, although we'll eventually move to openbsd probably for other reasons. In terms of package management... why do you need it? I have no problem maintaining everything with slackpkg and sbopkg along with slackbuilds.org. Sometimes it takes a while to find all the requirements for an application and add them to a queue, but once it's set up it's just sbopkg, click on update, upgrade, and you're good. It's pretty much rock solid once I get everything installed and I haven't missed package management much at all. My main gripe is the old packages in 14.2 but -current has a lot newer stuff. I don't mind waiting though.
- bandrami 7y agoIt's 2020, and nix and guix both run on top of Slackware just fine.
- baybal2 7y ago> there is no turning back. Iron grip, aggression, pushiness are needed to lobby systemd out. Another important initiative is to not to let Poettering, Sievers and co. continue throwing new systemds onto distributives. A preemptive action is needed.
- thristian 7y agoThe trouble is that 'nohup' is not a particular state that specifically marks processes that want to survive logout. Instead, the rule is that processes running inside a particular terminal are killed when that terminal closes, and processes running outside any terminal run as they please. If you SSH to a server, or telnet, or login on the text console, or via a serial port, you get a terminal and everything you run runs inside it, and the system works. However, if you login to a graphical desktop, that is not a text terminal, and therefore everything is effectively nohup'd: your browser, your chat program, your media player, all the miscellaneous helper processes they spawn, etc. Most people do want that stuff to be automatically shut down when they log out. Since the kernel's idea of "a login session" is wrong (it only includes text-terminals), and it can't easily be changed for compatibility reasons, systemd implements its own idea of "a login session" that works the way most people (who aren't experts on POSIX job control) expect.
- zozbot234 7y ago> However, if you login to a graphical desktop, that is not a text terminal, and therefore everything is effectively nohup'd Systemd's revamped notion of "session" includes graphical ones. Yes, that's different from the legacy sense of a mere text-terminal window. But since they've had to reimplement the whole concept of graphical sessions anyway, they could have made them work like textual ones. If you're not running a session manager as part of your windowed environment (almost everyone is these days) the whole thing might break, but then you can just enable the hacky "lingering" mode to make it work and you're no worse off than before.
- lmm 7y ago> Since the kernel's idea of "a login session" is wrong (it only includes text-terminals), and it can't easily be changed for compatibility reasons This is a CADT attitude. Improving existing interfaces while maintaining compatibility is hard; it's also what makes the difference between a serious software professional and an incompetent vandal.
- jka 7y ago'CADT' was new to me - noting my search findings, to save someone a little time: [redacted jwz domain]/doc/cadt.html (and yep, agreed, incremental safe progress towards a goal can be prone to disruption when people don't want to spend the time to consider existing use cases and the work required for gradual, graceful migration)
- pas 7y agoNo, it has nothing to do with remote and such. systemd uses cgroups (kernel namespaces), and if you want something to remain after you log out, then start it in a separate cgroup. cgroups are control groups, you know, to control processes. Which was simply missing for decades in Linux. nohup should be enhanced to support systemd, or systemd should provide a nohup wrapper, and just start a new scope (cgroup) for whatever the user launches with nohup. ... Now, that said, I have no idea why distros and systemd did what they did without much communication, but ... that's usually the Linux way :/
- zozbot234 7y ago> systemd uses cgroups (kernel namespaces), and if you want something to remain after you log out, then start it in a separate cgroup. Why should the user be concerned with how systemd happens to implement its session management. If you start a screen or tmux instance, it's unambiguous that you want that part of the session to persist after logoff and to be reachable upon logging on to the system again. That's what screen and tmux were designed to do.
- pas 7y agoThe user shouldn't be concerned. That's why the distro should solve this. But as we all know, abstractions are leaky, and encapsulation only goes so far. How should anyone know what the user really intends. When I start a tmux in a graphical session and click log out I want the system to stop my things completely, (almost) like I haven't even logged in. After all, my session never was set up to be an always-on server session thingie. The distro never advertised this, etc. Of course users who grew up on UNIX/POSIX/nohup and on distros that worked in a specific way (ie. without cleaning up processes after log out) expected this to continue. Debian made systemd default in Jessie, which was released in 2015, and it took 2 years for this subsection to appear there: https://wiki.debian.org/systemd#Orphaned_processes https://wiki.debian.org/systemd#Orphaned_processes It either did not bother that many people or no one really did anything to document/address it. Distros did not care apparently. systemd maintainers were aware that it breaks all and every double-forking self-backgrounding resident stuff, but they accepted the trade off, and even documented it: https://github.com/systemd/systemd/commit/65eb37f8fcf0c82db0d9b600bb804adf7ead0327 https://github.com/systemd/systemd/commit/65eb37f8fcf0c82db0...