Systemd Linger
Posted by edward 1 day ago
Comments
Comment by chlorion 10 hours ago
I think it's just popular to dislike systemd, some sort of echo chamber effect or something.
Comment by walrus01 1 day ago
I'm assuming this is same for tmux but hasn't tested it.
Is there some major distro out there that has the config flag set the opposite of this by default?
Comment by mike_hock 1 day ago
As mentioned in the second sentence of TFA. Debian enables linger by default.
Comment by yjftsjthsd-h 1 day ago
It bit me on pop os (the Ubuntu derivative)
Comment by egorfine 10 hours ago
Personally me I fail to see any scenario where this is genuinely useful.
Comment by unixhero 23 hours ago
Comment by graemep 1 day ago
Comment by Hendrikto 1 day ago
Comment by lucideer 1 day ago
Comment by BirAdam 1 day ago
Comment by dietr1ch 1 day ago
Comment by BirAdam 1 day ago
Comment by iririririr 1 day ago
systemd is awfully documented (volume is not quality), things are still changing and haven't even caught up in functionality with any init hack.
the only saving grace of systemd is that it almost makes it easier to use namespace and other sandbox (but only because those are newer and init systems also didn't have their solutions up yet)
systemd only purpose is to mimic windows administration in linux. sorry of anyone who fails to see this
Comment by jamespo 1 day ago
When are the init systems going to implement the basic security measures systemd has?
Comment by graemep 6 hours ago
Comment by jamespo 1 hour ago
Comment by otabdeveloper4 11 hours ago
Oh boy. Lmao.
Comment by 7bit 1 day ago
Comment by m0llusk 1 day ago
Comment by shevy-java 1 day ago
I also fail to see how verbosity is a "huge upgrade".
Comment by preg_match 22 hours ago
Comment by jamespo 1 day ago
Comment by jauntywundrkind 1 day ago
Ever company used to have to make its own decisions about what logging solution to use. Each one had its own configuration paradigms! Every single daemon had some kind of bespoke /etc/init.d/ script that had its own rules and practices, having either forked off some other skeleton or having been made on it's own at some point.
And then companies wanted to do the right thing and apply some capabilities restrictions to processes. They wanted a little more than out of box security. That results in every company forming and modifying init scripts, changing the configuration paradigms, encoding config directly in or inventing their own new parameterization.
The fact is I don't have to look at docs any more, because everything has a (pleasant) uniformity. The fact is we are worlds better at securing and locking down our processes, because systemd has incredible built in options for capability, sandboxing, and other fantastic security processes.
> There's just SO MUCH to grok in comparison.
There always was before too. Most people skated along the surface, but when some daemon tried to actually have better practices, do some security tightening, operators were in for that exciting rabbit hole of trying to catch up and learn. Or just hand wave it away.
I think this statement really iconifies the systemd resistance really. Yes there is so much (imo: enjoy it, isn't that so great?) It's many many many latent possibilities (for you to over time learn): it's so often what the kernel is offering you, it's well exposed, and you have a pleasant uniform system for harnessing that, that you only have to learn once and which can pay dividends again and again and again once you learn it. Learn once, use many.
Or just ask your LLM. It knows. It will just tell you. It won't have to read docs or source. It knows systemd very well. Because it is something shared, something known. Imo it ought be something treasured.
I'm fine if some day we get rid of systemd. Nothing sacred here. But to attack it, it must be attacked from above. It must be replaced by something with more principled and more capabilities. Same as Kube. Neither is going away, neither will ever be displaced by smaller offerings. The only way out is through, the only way out is up. Godspeed, good luck, have fun.
Comment by M95D 23 hours ago
> And then companies wanted to do the right thing and apply some capabilities restrictions to processes. They wanted a little more than out of box security. That results in every company forming and modifying init scripts, changing the configuration paradigms, encoding config directly in or inventing their own new parameterization.
IMHO, any competent sysadmin, when is installing the system, would edit all those templates into the exact shape the system and the user needs. Those file are just that - templates. The fact that overworked company sysadmins started using templates as final configuration and needed something automated instead, doesn't mean that this systemd that is fit for them is also fit for everybody else.
Comment by jauntywundrkind 11 hours ago
That, IMHO, is the other 90% of the problem (to riff on the ninety-ninety rule).
Every competent sysadmin has their own particular style & preferences & opinions about what the exact shape should be. And will go rewrite the world, according to some particular set of tastes, that they usually won't write down or document or socialize.
So not only do you have to figure out all the special sauce in how the service you just walked in to is managed, you have to wade through a complete re-architecting that some sysop made on their own judgement 5 years ago that people have patched and hacked since.
You can keep adapting to these scenarios. But to me, the normativity, the incredibly great toolkit of options it comes with: yes it's sizable, but it's one thing that I have to learn, that is usually a direct representation of something the kernel gives me, that will then be familiar and portable and useful wherever I go. This feels so much more civilized than what came before.
Comment by M95D 9 hours ago
That being said, I do understand the need for some standardization. But you missed this part:
> doesn't mean that this systemd that is fit for them is also fit for everybody else.
They practically forced everybody to use it, and not just the service manager, everything else too: init, logger, network, login, dbus, etc.
Comment by cwillu 18 hours ago
Comment by vrighter 1 day ago
X11 was pretty much standardized, that won't do.... let's invent wayland but make sure that there are multiple incompatible implementations of it!
and so on. I love linux, but this sort of mentality is ridiculous
Comment by inigyou 1 day ago
Comment by graemep 6 hours ago
Comment by po1nt 1 day ago
Comment by nubinetwork 1 day ago
What is there to know? It goes up and down, and don't stick your arm inside...
Comment by po1nt 1 day ago
Comment by M95D 23 hours ago
https://www.manualslib.com/manual/3389176/Cincinnati-90-Form...
Comment by 7bit 1 day ago
If you still think there is only one Systemd, maybe learn about the tool instead of just talking others after their mouth.
Comment by po1nt 1 day ago
Comment by preg_match 22 hours ago
Comment by graemep 3 hours ago
Comment by po1nt 13 hours ago
Comment by iririririr 1 day ago
you seem to be repeating all the marketing, while mentioning in other comments you never understood any init system. i don't think you're the authority to be adding so many comments here.
Comment by rnhmjoj 1 day ago
You can forward logs to rsyslog or something, but you really can't disable systemd-journald. Technically you don't need to run systemd-boot, you can use grub or something else, but then bootctl and systemd kexec stop working. You don't need to run dbus, but if you don't several systemd features break, and it's not even documented what needs it. The list goes on and on.
Also, the fact that all components are in the same repository and need to be built together causes a lot of headaches with packaging due to dependency cycles (like, systemd -> cryptsetup -> lvm2 -> udev -> systemd).
Comment by preg_match 22 hours ago
Yes, some software is more tightly coupled than others, naturally. systemd-init and systemd-journald work tightly together because logging is a core requirement of any init system.
Comment by rnhmjoj 9 hours ago
Comment by M95D 1 day ago
Comment by egorfine 10 hours ago
Comment by shevy-java 1 day ago
You most likely refer to sysinit or something like that, right? Because to what else do you compare it to? Shell scripts?
Shell scripts in general are crap. I don't understand why linux systems use them. When I transitioned to linux a long time ago, I wrote - and still write - pretty much all logic in ruby and .yml files. Literally my whole system is described via .yml files, ruby then just auto-expands all of this into what is meaningful. I also compile from source and manage the system via ruby as-is, so I don't even need systemd, nor shell scripts. But this is just one comment here and if you refer to shell scripts then I agree with you - shell scripts have always been horrible. I fail to see why we should like systemd merely because shell scripts are so awful. That makes no sense. I neither use systemd nor shell scripts (ok ok I bail ... I am currently using manjaro which uses systemd; I disabled most of the services, but the primary reason I was assimilated into systemd is mostly because the non-systemd linux distributions, kind of gave up for the most part or come with their own set of problems - slackware, void and so forth. And yeah, I was using and testing them for ages too, slackware I used for many, many years. It is still a great distribution but it is not really active anymore. No new .iso releases in years, sorry, that is dead. Even if Patrick still updates packages.)
The other part is ... IF you referred to an alternative init system, then THAT comparison is flawed too, because sysvinit is mostly just an init system. Systemd is some giant thing that does 100000 things. So the comparison is, and ALWAYS has been, unfair. Not the same things are compared here.
Comment by eptcyka 1 day ago
Comment by yjftsjthsd-h 1 day ago
Also logind is so hard to avoid that even other systems have ported it: https://wiki.alpinelinux.org/wiki/Elogind
Comment by yjftsjthsd-h 1 day ago
dinit is a good service manager that doesn't feel obligated to reinvent the kitchen sink
Comment by dosisking 1 day ago
Comment by preg_match 22 hours ago
The bright side is this is all logged, trivially grep-able, and easy to fix.
Comment by bombcar 1 day ago
If you have 20+ years of experience, you’ll will NEVER get it to work the way you expect, might as well install Gentoo.
Comment by NekkoDroid 1 day ago
I dunno, "things not working the way I expect" is very subjective.
I personally think it makes more sense that processes do not outlive the parent from which they come (in this case processes spawned from a user shouldn't outlive that user) unless you explicitly go through something which outlive the parent (process manager in this case (e.g. running via systemd-run)).
Though I am also strongly of the opinion of just because something is a feature, does not mean it is good to keep around, e.g SUID/SGID (which has a similar "I get more than the parent" problem).
Though I guess different people can have different opinions/values on this.
Comment by mike_hock 1 day ago
Comment by Someone 1 day ago
Even if the change is a genuine improvement?
Comment by egorfine 10 hours ago
I'm all for improvements and I love updates of software, but what systemd usually does is ideology and destruction in the name of "new". Like, we have had cron perfectly working for _decades_ until one man told us we were all wrong on that.
Comment by dosisking 1 day ago
Comment by graemep 1 day ago
> One of the features of systemd that is most controversial is the option to kill user processes when the user logs out. That initially killed screen/tmux/nohup processes too.
Killing processes that the user clearly did not want killed is a regression.
Reading the rest of article it seems that its fixed but made things a lot more complicated than "unless you deliberately start things so that they keep running when you logout they will be killed when you logout". Am I wrong?
Comment by preg_match 22 hours ago
I'd argue the opposite is true: linger is surprising, and I turn it off.
Comment by graemep 6 hours ago
If that process is killed when I logout then that is a regression.
I do not understand what this has to do with udaptes.
Comment by qweqwe14 1 day ago
There is a reason why systemd became the default and other niche init systems have faded into obscurity.
Sure, it may be more complex than your pile of shell scripts, but that's because it does the same things better, and has a lot more functionality that you will need at some point, and good luck replicating that by hacking shell scripts.
Comment by yjftsjthsd-h 1 day ago
When I start a program, I want it to stay running. This is perfectly consistent and not broken.
Comment by graemep 1 day ago
Comment by halJordan 1 day ago
Comment by TacticalCoder 4 hours ago
Here's one you cannot disprove: the Jian Tan XZ backdoor did not affect Linux distro that weren't using systemd.
I know, I know, it's got absolutely nothing to do with systemd.
We're talking about something insane like upstream OpenSSH being modified to add systemd logs "log compression" to freaking OpenSSH (yay security, makes perfect sense!).
So disprove this: not a single Linux systemd-less distro was affected by an attempt to place a worldwide backdoor on Linux systems exposing a SSH port.
P.S: I moved all my infra to VMs that are systemd-free and containers, by default, do not run systemd as PID 1 (they don't run it at all). It works flawlessly. I'll now move my hypervisors to FreeBSD+bhyve and I'll be, at long last, totally systemd-free again (I was using Linux before "systemd-I-compress-logs-so-I-make-you-modify-OpenSSH-to-add-liblzma-dependency" came on the scene with it's its Windows-style .INI files and these were much better days).
Comment by nurettin 1 day ago
You must love SELinux
Comment by ChocolateGod 1 day ago
The article even mentions that distros ship with it turned off
Comment by yjftsjthsd-h 1 day ago
Comment by dietr1ch 1 day ago
Sound like you don't like computers to begin with
Comment by dosisking 1 day ago
Comment by BigTTYGothGF 1 day ago
Comment by shevy-java 1 day ago
Comment by surajrmal 20 hours ago
Comment by dietr1ch 1 day ago
Comment by saturn_vk 1 day ago
Comment by agumonkey 1 day ago
Comment by realusername 1 day ago
Comment by benj111 1 day ago
And that being the case can systemd not just only close everything when your logins reach 0?
Comment by tux3 1 day ago
Except systemd can kill it when you log out, so you come back to nothing.
Comment by c-hendricks 1 day ago
Edit: ah, this post clears it up. Mentions linger has nothing to do with screen muxers, and also brings KillUserProcesses to peoples attention.
Damn systemd and its multiple levels of convenience.
Comment by benj111 1 day ago
It seems to me if you want persistence between logouts, the processes should belong to a different group/user.
(I'm spitballing hypotheticalshere, not saying anyone/thing in particular is wrong)
Comment by dietr1ch 1 day ago
Do you want user-level services, or a multi-tenant system-level service? - Who can tweak the service configuration? - How do you ensure there's no data leaks between users? - What about misbehaviour? Quotas, crashes
I think lingering is great here
Comment by benj111 1 day ago
I'm not necessarily talking about the Unix concept of a group. It seems to me you want some granularity between 'kill all processes' and 'keep all processes'
Comment by egorfine 10 hours ago
Comment by kmbfjr 1 day ago
But this, systemd-logind worrying about stuck processes in userspace is exactly the kind of scope creep that ends up justifying a lot of the hand wringing a decade ago. This thing bit me when it came out in a couple different ways and I am unapologetic in my dislike for it. So much so that it has caused me to drift away from Linux where I can. Even though it is a simple fix, I’ve become fatigued with userspace chaos.
Time to re-evaluate what the bazaar has become. Systemd is a common complaint, but it isn’t the only contributor to the fatigue.
Comment by iluvcommunism 1 day ago