Systemd Starts Killing Your Background Processes By Default (blog.fefe.de)
New submitter nautsch writes: systemd changed a default value in logind.conf to "yes", which will kill all your processes, when you log out... There is already a bug-report over at debian: Debian bug tracker.
The new change means "user sessions will be properly cleaned up after," according to the changelog, "but additional steps are necessary to allow intentionally long-running processes to survive logout. To effectively allow users to run long-term tasks even if they are logged out, lingering must be enabled for them."
The new change means "user sessions will be properly cleaned up after," according to the changelog, "but additional steps are necessary to allow intentionally long-running processes to survive logout. To effectively allow users to run long-term tasks even if they are logged out, lingering must be enabled for them."
In my mind if you want background processes to stay alive, you should explicitly state so, and not have the system make the assumption, even if it has been the convention that background processes do stay alive. To me it just seems a potential vector for a backdoor or something, I dunno >
Better feed it. :)
"user sessions will be properly and improperly cleaned up after..."
FTFY.
"National Security is the chief cause of national insecurity." - Celine's First Law
Yay! Awesome!
systemd is by far the stupidest thing to happen to Linux, ever... It's not that different from Java. "Oh, new clean shiny thing that is lean and mean!" Then they halfheartedly learn what the real world requires and half-ass it ever since.
Or you know use Slackware... it's the oldest Linux Distro and does not use systemd.
Do not look at laser with remaining good eye.
So, "screen" has always been a good way to ensure that processes don't get killed randomly by disconnections, logout or X crashes.
Then comes systemd and kills all your processes at logout, even when launched with screen.
Finally, then comes Poettering, explaining you that you're a moron if you expect to keep those processes running.
Seriously, the systemd devs make it really hard no to hate them.
You use old beater machines instead of virtual machines? God I remember when I did that... So much clutter due to holding on to old computer parts that I'd usually never end up using, but still keeping them "just in case". My last move was so much easier without packing up a garage partially filled with that shit to bring to the next house.
Fear not, people of Slashdot, because there is an option to maintain background processes, even after user disconnection.
But this option is not "on" by default. So, yeah, screen and tmux all of a sudden become useless, unless you fiddle with the knobs.
Seriously, now, fsck systemd: Slackware and OpenBSD for me from now on.
Even Mac OS X has the decency not to mess up your tmux sessions when suspending and restoring your session. Fsck systemd.
The right to offend is far more important than the right not to be offended. (Rowan Atkinson)
> A multi-user system shouldn't allow unpriviledged users from consuming resources indefinitely
You're an idiot.
If I log on and start vim and two weeks later I've still got that screen sesh up, I sure as fuck do not want my unpriviledged account to have its processes terminate.
Docking/shutdown makes sense. You've turned off that (conceptual) computation device. But that requires the end user to say they're done and shut down. Doing it automatically is incredibly fucking stupid.
Or Gentoo. systemd is optional on Gentoo.
The real "Libtards" are the Libertarians!
A multi-user system shouldn't allow unpriviledged users from consuming resources indefinitely
Crippling the service is not a good way to protect the server.
There are other ways to protect system from users to consume all the resources. Admin can and should setup the server the way it is protected from incompetent/malicious users.
If you make this protection by killing processes after logout, you are actually removing functionality from it. And for me, it's a step backward.
Because for most linux is not a desktop os, we use it one servers. I've had logged in screen sessions that date back to when machines were built. Systemd keep thinking that people want it for a desktop os, for their laptop etc. I've got literally thousands of physical boxes running linux that I deal with I've only got one linux laptop so the laptop scenario should never be the default for me, the systemd devs seem to keep thinking their linux laptops are the majority.
No sir I dont like it.
> A multi-user system shouldn't allow unpriviledged users from consuming resources indefinitely.
man 5 limits.conf
In short, *nix has provided ways to do just that for literal decades.
Again and again I've heard people like you suggest that Slackware is a replacement for a modern mainstream distro like Debian. Others suggest Gentoo.
Well, the reality is that neither is sufficient.
Slackware is, to put it politely, very primitive. While simplicity is a good thing, Slackware takes it to the point where it becomes a liability.
When using Debian, it's possible to get a full-featured desktop or server set up with very little effort, and this can be done quickly. Thanks to sensible defaults and a practical installer, manual configuration is kept to a minimum.
Slackware, on the other hand, requires far too much manual intervention just to get a minimally usable system set up. Maybe this isn't a problem for a hobbyist who tinkers with Linux on a weekend, but it is a problem for people who are seriously using Linux, especially in a business setting. They can't afford to waste time and effort on Slackware, especially if a distro like Debian manages to avoid such waste.
Gentoo really isn't much better. It's not as bad as Slackware, but Gentoo is still a niche distro, and its whole compilation strategy is wasteful for anyone but hobbyists.
At this point, sensible and experienced Debian users have realized that Debian systemd/GNU/Linux is a lost cause. They've moved to FreeBSD ages ago, or are in the process of doing so. If Slackware and Gentoo are the only viable non-systemd options left for those who want to use Linux, then Linux is just not suitable for use.
FreeBSD gives much of what Debian used to give: stability, reliability, trustworthiness, an excellent packaging system, a superb installer, sensible defaults, no systemd, and an environment that's perfect for both desktops and servers. In some ways FreeBSD is even better than Debian traditionally was: much of the FreeBSD code is released under truly free BSD family licenses, rather than the far more restrictive and less-free GPL family.
This story: Systemd Starts Killing Your Background Processes By Default
Previous story: Massive Backlash Building Over Windows 10 Upgrades
That's the best conjunction of two headlines that I've noticed in my many years here.
FWIW, I'm a happy PC-BSD user, not that this is a panacea by any means, but there does seem to be less of the "stupidity on a rampage" form of collateral damage.
I pay the price with a lot more "W?TF doesn't Firefox play this media type either?" and I find I have to page bounce to Chrome once or twice almost every day (my FF is plug-in central, my Chrome is naked install).
Unfortunately, I can't even brag that PC-BSD is a successful Poettering removal tool, as I still had to fight some nasty battles with PulseAudio due to rampant ecosystem taint in the package tree that PC-BSD doesn't have the resources to strip out (nor, sadly, does the entire *BSD Avenger collective). Get this, the GUI control I needed to mess with only appears if certain PulseAudio processes are active, but because of my debugging mode, those processes were timing out before I could visit all the places where I thought the GUI control might possibly show up (discoverability anti-pattern in anti-flagrante delicto).
Every large software ecosystem must eventually manage breakage. There are good ways to go about this, and there are bad ways to go about this, and then there are Poettering ways to go about this. It's the added ego problem that seems excessive.
What about when I have a long running process I need to run and I don't want it to be stopped if I get disconnected from wifi? Or maybe I know it'll still be running when I have to go home?
The way it is now, if I just disconnect from ssh, they get killed. If i go out of my way to ensure they won't (e.g. start them in a screen session) then they aren't. How is the old way a problem?
"it should rather be disabled .. by setting KillUserProcesses=no in /etc/systemd/logind.conf ." ref
No, it wouldn't be. First, if you will contemplate what is involved in saving state, you'll realize what an incredible challenge it would be to do so perfectly every time in every case.
For example, if I start a slow FTP session, how will the magic state saver cope? Remember, the remote server is not taking part in the state saving.
Second, had you done that, wouldn't you be a bit disappointed to find out 24 hours later that the file transfer has made no progress at all?
Screen, nohup, and friends exist explicitly to allow a terminal session to dettach and re-attach as needed. I use screen all the time, especially where a firewall might time out.
It's probably best for the system to work like it's always worked. If they want Potterix to work differently, they should put out a distro.
Apparently, according to some reports, this came about because Gnome can't properly kill off all your sub processes when you log out.
So, systemd to the rescue. Why is anyone using gnome again?!
So I log onto a server, start a all-night process, log off, and shut down my desktop it should mean that my process should also be killed? Or do I have to keep my desktop on all night and hope that the connection doesn't drop just to keep the process running?
Or sometimes I can log on to a system to start a long process which will send me a notification when it's done. Why should I stay logged in taking up resources just so that the process can stay running? It's better for the system for the process to be running in the background and me to be logged off. If I do things properly I set up my job to run at a lower priority but the OS is going to have a good scheduler to ensure that active users are given priority.
Do that all you want on a desktop. On a server, perhaps nobody cares or perhaps the admin will kill your processes. Keep in mind, if you don't actually touch the pages your allocation only exists in theory. If you do, it'll get swapped out if you don't keep touching it periodically.
Once it becomes obvious you're burning resources for fun, the admin will either drop your ulimits down or terminate access.
I run a few systems where the user is expected to start simulations that may run for weeks. I don't need something to start mysteriously killing those processes off.
The functionality remains the same, even with the new systemd defaults. But instead of using "nohup /program/ &" you use "systemd-run --user -scope /program/".
So a slight change in syntax, not a big deal IMHO.
You morons all sound like a bunch of Mac users.
Actually, if, on a Mac running OS X, you do nohup blahblahblah >/tmp/blahblahlog 2>&1 & in a Terminal window in a GUI session, and then log out and log back in again, blahblahblah will still be running (verified experimentally on an El Camino (virtual) machine just now).
(If it warns you that there's a process running in Terminal, and that logging out will kill it, tell it to close the Terminal window anyway; it's lying, the process will survive. I'm not sure what signal is getting sent, if any, but it ain't SIGKILL - perhaps it's SIGHUP, as nohup's purpose is to make the process ignore SIGHUP.
The Unix tradition has always been "you want your backgrounded processes to survive a logout, nohup them" - traditionally, when the tty driver saw that carrier dropped, it'd deliver SIGHUP, although I'm not sure all UN*Xes pseudo-terminal drivers deliver SIGHUP when the master side closes, that being the closest moral equivalent to carrier dropping; I think I've seen that not happen on OS X, but didn't dig through the pseudo-tty code in XNU enough to see why that wasn't happening or to determine whether that was intentional.)
How is the old way a problem?
That's systemd in a nutshell (and pulseaudio too). Replace well-known things that are not broken with something obscure and clunky that thinks it's smarter than you.
systemd, unity, iTunes, Windows 10... We live in a world where mediocre aspies decide how other people should use their computers because they work in large footprint organizations that have no competent dictators.
lucm, indeed.
"Wouldn't it be better to save state on logout and restore on login?"
Wouldn't it be better if you learn that for the computer to do things on my behalf it's not needed that I stay in front of the computer, that I don't even need to maintain an interactive session opened for that to happen?
This is anti-daemonic. Systemd is committing daemon genocide while you log out and turn your back on it.
Changes like this make me wonder if the systemd developers even use Linux beyond their local development workstations. This isn't just an inconvenient change, it breaks the expected and decades old behavior of how Unix machines work. This breaks ^Z/bg/disown, it breaks screen, it breaks nohup, etc. Yes, these things can be made to work still but, why do I need to jump through hoops to re-gain the functionality I've relied on for decades? If I'm not aware of this change, how would I even figure out why all my screen sessions died when I logged out? What benefits am I gaining by having this be the default behavior?
One of the best things on linux is screen. I can start a long calculation, compile, transcode, whatever, log out, drive home, and pick up where I left off. Let the computer work while I drive: there's no reason for it to be stuck in traffic, too.
In the movie Fahrenheit-451 you're the dude gleeful that all the clutter is being cleared away.
So other than again pointlessly changing the well known and understood API, what's the point of systemd again? How about just leave things the way they were?
That is, when the tty disconnects, it sends SIGHUP to the processes it controls. It's up to those apps to determine what is the right thing to do upon recieving SIGHUP.
It's not the aspies fault. It's the organizations as a whole going for the lowest common denominator. Google Chrome, for instance just got rid of "backspace = prev page" because it was confusing for some users. Power users probably enjoyed this feature and all the other features that get axed because "not enough users/confusing for some" reasons, and the end result is the Duplo-ization of whatever the product is. A product that anyone can use without hurting themselves, but that advanced users will find very frustrating if they want to do anything interesting.
It isn't bad to have products like that in the market, but it's frustrating when all of the products follow that path.
You are exactly correct. Distros will have the final say in conf defaults. I don't see many holding onto the yes value for server branded versions of their distros, way too much breakage. For desktop and workstation, maybe, we will have to see. But seriously, this whole thing is a massive overreaction to a value that can be changed in a text editor in less than two seconds. But of course we all know that any systemd news instantly makes front page because of the massive knee jerk Slashdot has for systemd.
Its something that, if you are unaware of the change, can break things badly, perhaps even messing up ability to remotely administer a server and have to call for remote hands. So IMO its something, the default behavior of which, should not change within a major release version.
However its also the sort of thing I could see a Debian package maintainer deciding is a 'security patch' and pushing it out to stable that way. Similar to what happened with sudo.
In the free world the media isn't government run; the government is media run.
Sorry, but "Devuan" sounds like a half-black, half-Puerto Rican ladyboy. I can't seriously consider using it.
Even with the new settings, no user process will be killed on exit/logout if the user have told the system not to.
Instead of starting the program with with "nohup" you start it with "systemd-run" instead.
Yes. The issue isn't that it can't be done. The issue is that longstanding default behavior has changed. Since it appears that there's no good, solid reason for the change, people are objecting to it. Change for change's sake is bad.
Because they are remote headless systems and I don't need to stay connected to them in order for them to do the stuff I want them to do?
That isn't a problem of course, even with the new systemd defaults. Just use systemd-run --user --scope screen and the process and all other processes started from screen will survive logout.
Do you really think that's a reasonable answer to the question of why systemd had to break things like nohup and screen?
You don't make gratuitous changes to systems that fundamentally alter how the system works and break common utilities in the process.
If you'd get Poettering's cock out of your mouth for ten seconds you might realize this.
Yes. The issue isn't that it can't be done. The issue is that longstanding default behavior has changed. Since it appears that there's no good, solid reason for the change, people are objecting to it. Change for change's sake is bad.
Why do you think there no solid reasons for this new default. It is something somebody told you, or are you just presenting what you imagine as facts?
Log out = no more of your processes. Normal. Having "nohang" processes, for a regular user != root, is the exception.
Slashdot, fix the reply notifications... You won't get away with it...
Ah, but the price for using 'systemd's extensive resource management options' is that it breaks your workflow, shell scripts, and everything else you might have had that relied on 'nohup' or 'screen' working as advertised. That's not improving anything. That's a Mafia protection racket.
"Nice shell script you've got there. It would be a shame if something happened to it. Use this command to run it, or else, who knows what might happen. Fucking pathetic.
*For a concrete example, all of your scripts that automatically ssh into a server, start a process with screen, and log out, now break. To name just one thing that I have done on numerous occasions.
Or you can just not use systemd, if you dont like it then dont use it.
Easy to say, significantly LESS easy to do.. I use/prefer either Debian or Ubuntu, and am currently on Ubuntu 14.04.. Since both the latest Debian (Jessie) and Ubuntu (16.04) now have systemd, as do most other well-known distros. Its beginning to look like I'm going to have to back to my "Linux roots", namely Slackware, where I started, back in 1995, when Ubuntu 14.04 goes out of support in 2019. From what I can gather, Pat V hasn't (nor will he) pollute Slackware with Systemd.
THANK YOU, Edward Snowden!! Americans owe you a debt of gratitude (whether they know it or not..)
Ordinarily, a user's processes SHOULD all be killed on logout. They're no longer logged on; they're no longer using or entitled to use the machine.
For better or worse, that hasn't been the way UNIX worked since at least the 1975-vintage V6 - you could use nohup, redirect the standard input/output/error, and run in the background to make a process be a job that survives logging out.
However, there will be cases where something long-term needs to go on. How hard is it to add daemons or background services in an administrator or batch context? That's where the long-term stuff should go. Olde days with VM/CMS: CMSBATCH was available to ordinary users if some job would run too long to be practical in foreground in the user account. Submit; it runs when scheduled (by the user or the system, depending on load) and returns results to the user account.
Perhaps UNIX should have had such a mechanism since the beginning, rather than later, for example, getting the at/batch command. For what it's worth, it didn't, only getting it later.
That's pretty much what I did a couple weeks ago. Then I realized "wow, this is so nice and clean running! It does exactly what I want, the way I want it!" And that is the whole reason I started with Slack way back in 1996.... The thing about systemd and pulseaudio is that they provide exactly *zero* new features that I needed, whilst severely screwing with the system. I went thru RH, SuSE, Debian, and now back to Slack... RH in particular lately has been pulling some bonehead moves WRT the traditional Linux base.
C|N>K
And nohup up is what systemd is breaking in this "update" ... do try to keep up.
These people (Lennart et al) just do not get the concept of a multiuser operating system so it makes perfect sense to them.
One of the more bizzare of which is you could speed up performance of X by blocking a port that pulseaudio listens to on the network. There should have been an option in pulseaudio to turn that absurdly resource hungry polling off instead of having to use iptables to block it.
Everything RedHat has put a lot of work into has been embraced, even NetworkManager and SystemD.
Basically systemd is built on a totally fucked up concept - a concept in which whatever the users do is not important, only system resources count, and if the users do not like it, they can go fuck themselves
That is basically what systemd is - and it perfectly reflects the way systemd's proponents think as well
Muchas Gracias, Señor Edward Snowden !
Guys I think this Peter H.S. is deliberately trolling and is writing this ridiculous stuff just to get people angry.
A multi-user system shouldn't allow unpriviledged users from consuming resources indefinitely. It's too easy to starve a system or resources. I think that's one of the reasons behind the isolation dockers provides in the first place. Shut down the container and everything gets cleaned up.
What "multi-user systems"? Multi-user systems died somewhere around the turn of the century, when the personal computers became common.
Secondly the people whinging about there do not give a shit about your concerns over large computer systems. And you should listen to them, because they are the people who run those systems. They are the sysadmins in charge of large clusters of machines they control with the likes of ssh, ansible and puppet. If there is a task left running when they log out, it is because they wanted it to be running.
All that aside, this is not 'nix having some issue with leaving processes running indefinitely when a person logs off. I've used 'nix of one version or another since V6 - and even back then it had a solution. When the user logged out, a SIG_HUP signal (so named because back then it was trigged by a modem hangup) was sent to all processes started by that login, and they were killed. So it's been a solved problem for 30 years.
The current problem is the caused by desktop guy's themselves. All the processes that drive their windowing systems needed to communicate, so they created one. Actually they've created several - corba, dcop, and now dbus. Initially they were used for communication configuration changes and such - eg, when you change the desktop font size everyone knew about it immediately, so the entire screen just changed. Then they found new uses for their toy - and soon it is used to communicate to backend daemons to do thing like bringing network interfaces up and down, which often required new processes to be created. That was followed by "address book servers", and "wallet servers" and god knows what else. In doing so they managed to break the old SIG_HUP system for desktop users, because their sometimes new processes weren't spawned by child processes of the login - they were instead spawned by system daemons.
So the desktop guys created a problem for themselves (only). The rancour you see here is the solution they have implemented and forced down everyone's throats breaks existing stuff. This is just laziness. If they insist on designing systems that have background daemons spawning per-session processes they could go to the effort of, you know, tracking them, so they can kill the bloody things when the session ends. Tracking things is after something computers do real well. Yes it would be more work - but they created the problem.
That said - if they were to go to the effort of accommodating legacy stuff (which they did in an exemplary way for the change from SysV init to to systemD init) by say offering up patches to the few programs that do leave stuff running in the background (nohup, term, screen, ...) I still wouldn't be satisfied. That is because what they have put together is a godawful mess, and this "solution" typifies it.
The first time I noticed the winding IPC monster was starting to grow is vim complained it could not save its settings ... when I was running it on a remote machine. wtf? Turned out they had pushed the tentacles of this mechanism to a remote VIM, and it was trying to save its settings on my laptop. Then ssh stopped shutting down properly - turned out because they weren't closing the IPC tunnels they had built. Then network connections started mysteriously changing their configuration - because the desktop had told network-manager who told a dhclient to do something with a virtual network device I had just created - wtf? It has since become evident that where before I could see state of my machines in static text files in well known places usually put there by me, now it was configured by inscrutable ephemeral messages being tran
Or you could edit one line in one config file and get the behaviour you want back. No need to throw a hissy fit.
There is still a huge reason to throw a fit. If I need to kick off some background jobs on a bunch of machines reliably, I will now have to check how the system is configured first, and probably wrap that up in my own nohub-or-systemd-run wrapper, checking if systemd-run even exists, if so, how is logind.conf configured, then use the correct wrapper. All this why? Because some applications aren't respecting the conventions that have existed for ages, so let's make new ones?
But that's exactly what systemd does! It gives you tools to run these processes in their own scope, so that their resources can be properly managed, and the admin knows that these processes are meant to hang around.
"I know I will be modded down for this": where's the option '-1, Asking for it'?
Actually, if, on a Mac running OS X, you do nohup blahblahblah >/tmp/blahblahlog 2>&1 & in a Terminal window in a GUI session, and then log out and log back in again, blahblahblah will still be running (verified experimentally on an El Camino (virtual) machine just now).
Harrumph El Capitan, d00d.
(If it warns you that there's a process running in Terminal, and that logging out will kill it, tell it to close the Terminal window anyway; it's lying, the process will survive. I'm not sure what signal is getting sent, if any, but it ain't SIGKILL - perhaps it's SIGHUP, as nohup's purpose is to make the process ignore SIGHUP.
To be fair, the OS X nohup, as well as, apparently, the OS X screen has been modified to call _vprocmgr_detach_from_console() , and that document is part of a version of tmux ported to OS X.
So perhaps screen, tmux, and nohup need to be modified to, on systems with systemd, do whatever the appropriate magic is necessary, just as is done on OS X.
It's not the daemons I'm worried about, it killed my children! And ate my cat.
Despite ongoing challenges, I am yet to see a use case presented that the existing initd system cannot handle if you take the time to understand how to use it properly.
I genuinely want to know why systemd is better than initd? As now I am being told that I'll have to make modifications to the way somethings that have worked for years. Do you systemd proponents actually have *any* experience on enterprise systems and how hard it is to get root access to modify these behaviors?
If you want systemd so badly - why don't you just make it a service of initd? Why are you guys, who cannot demonstrate you know any better, subjecting everyone to use this?
My ism, it's full of beliefs.
Apt-get install sysvinit-core seems to fix it...
apt-get install sysvinit-core presents far fewer problems and future surprises. Why swat flies all day when I can just close the screen door?
Google "principle of least astonishment".
Beyond that, the question was "So other than again pointlessly changing the well known and understood API, what's the point of systemd again?", not "How can I turn/burn that particular wart off?
While "clean up after yourself" is generally a good idea (ask your mom!), in this case it is going to cause a lot of problems because it is being enforced from above in ways that will have unintended consequences because the enforcement mechanism doesn't understand context. I am sure that screen/tmux aren't the only tools affected.
Heck, I implicitly rely on persistence of background processes myself on a semi-regular basis. Doing something that runs counter to this expectation is going to break random stuff, and result in a lot of pissed off sysadmins. This behavior arguably makes sense for desktop distros, but given that Debian is primarily a server distro it should not be the default. Let downstream desktop distros like Ubuntu/Mint/etc. modify the default behavior, if they deem it appropriate (it doesn't even require a code change, it is a config option).
It is also symptomatic of the "all bow down before systemd" mentality, and I have a big problem with that. They may have good intentions, but there are some serious issues with how they're going about implementing their vision.
Apologies.. Killing nohup'd processes is so undeniably stupid I read the summary wrong.
Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
Don't use systemd. It violates the very core philosophy of Unix.
And on the Eighth Day, Man created God.
The article is wrong. Systemd didn't change anything. Debian's config for systemd changed a default. Either option is a problem for people. But its not unreasonable to assume that users that want to have long running process know more about their systems and thus how to change them than users who want everything to stop when they logout. The change in default makes sense, and systemd is doing the right thing here.
What's a pain is the disruption caused by transitioning from a non-sensible default to a sensible default.
So it's okay for malware to be running as long as you're logged in, but it has to stop when you log out?
That's the second stupidest thing I've read in this thread.
I left Windows (when it was 95) for Linux, because all I could do more was copy/paste some things into the regedit that I had no real idea what they were doing.
With Linux I had a system that I could do things myself (and screw it up myself).
Now we have a BIOS that wants to do everything, running a boot loader that wants to do everything staring a GUI that wants to do everything with a Desktop that wants to do everything that runs a browser that wants to do everything to visit a site that wants to do everything.
And if you have an issue, they all yell "It wasn't me." and point their fingers to others as if they are toddlers who stole candy.
Don't fight for your country, if your country does not fight for you.
systemd seems to want to fix the problem that Linux is a successful server OS.
"we are all atheists about most of the gods that societies have ever believed in. Some of us just go one god further."
Systemd, you've solved a problem that was never really much of a problem.
“Common sense is not so common.” — Voltaire
New system options
1) FTP command line registers with systemd that's its going to be doing a download over the next 12 hours from a slow server.
2) You run FTP from inside systemd telling the process manager this FTP is going to take 12 hours
3) After you start the FTP process you notify systemd
etc...
Wouldn't it be better to save state on logout and restore on login?
Why?
This would provide the balance between saving system resources and allowing a user to start off where they left off.
What resources do you think you're going to be saving here? There are various ways of allocating resources to a user and they then use those how they want. restricting this to log on and log off is incredibly stupid.
Of course applications would need to be aware of state saving. Is there already some sort of API for this?
Jesus Christ. We don't need an API, or to add systemd support to anything because it ALREADY FUCKING WORKS.
Correct. systemd is part of a broader system that is replacing POSIX.
ROTFL. Oh, right. systemd gets a new purpose in life every week. So, what happened to the init system then?
...and would also know not to use Debian Sid on a critical server, BTW.
Errrr, Sid eventually turns into 'stable'........?
screen DOES work as intended as long as you care to correctly start it in its own seat/session/namespace/container (and all those non-POSIX-y stuff that Linux handles and that systemd manages)
Which doesn't qualify as working. Quite why people think something should have to be run differently when you are logged out as when you are logged in is truly mystifying.