|
|
|
|
|
by megous
1908 days ago
|
|
Infinite loop will stay up for years too. Running "in the background", handling of stdin/out/err, logging, detaching from tty, creating a new process group/session, closing fds, and much more is handled these days mostly by systemd. No need to put all this into your program at all. I'll give you that signal handling still needs to be done in the target process, if the defaults don't satisfy you. But you really don't need anything special anymore to make any old script into a daemon. |
|