4 ms·
Is Systemd a nohup equivalent? If it is, then what's the benefit of using one over the other?
by Curious42 10y ago
Is Systemd a nohup equivalent? If it is, then what's the benefit of using one over the other?
- fnord123 10y agonohup just runs a process that will ignore SIGHUP. systemd can also run processes that ignore SIGHUP. But systemd does a lot of things that nohup doesn't do. Please don't attempt to use nohup as a daemon management system for anything but the noddiest of tasks. If you're going to use anything, you're probably best choosing from this list: https://en.wikipedia.org/wiki/Operating_system_service_management https://en.wikipedia.org/wiki/Operating_system_service_manag...
- JdeBP 10y ago... which misses out quite a lot, from s6 through perp to initng.
- koolba 10y agoWhile nohup is used to daemonize a single process, systemd does that and a ton of other stuff. It's a replacement init system that includes everything from daemonization, log handling, auto restarts, and by this time next year will probably make coffee for you as well.
- bandrami 10y agoThis is what I've never understood about systemd. Somebody will ask "doesn't inetd already do that?" or "doesn't nohup already do that?" or "doesn't runit already do that?" and the answer is always "yes, but systemd does a bunch of other things something else already did too". shrug Its setup is way, way too brittle for me, but I guess the QR codes are kind of neat.
- deathanatos 10y agoMy requirements (for server side daemons) are approximately: start a daemon as a child, and monitor it; if it dies, restart it. Ideally, give me a command-line interface to the managing daemon to gracefully start/stop the child. nohup doesn't do this, making it simply not the right tool for the job. I've never used runit, but it looks closer.
- bandrami 10y agoTake a look at PIES[1]. I've switched most of my production systems to it. I especially like that it's inittab-compatible. [1]: http://www.gnu.org.ua/software/pies/ http://www.gnu.org.ua/software/pies/