3 ms·
This approach has many problems; in particular, it lacks an intelligent backoff. A looping service will get continuously restarted. It doesn't handle service
by dekhn 2y ago
This approach has many problems; in particular, it lacks an intelligent backoff. A looping service will get continuously restarted.
It doesn't handle service dependencies. What if I only want my service to run when I'm on network and VPN is disabled?
And I can think of a lot more. All these things have been implemented in init, or in systemd, for decades.
- matheusmoreira 2y agoI agree with you. I use systemd myself and think it's great. It was just an example of how simple things can be when programs don't daemonize. Supervising and managing the processes is systemd's job and it does it well. Daemonizing makes its job harder and is not necessary to begin with.