by lealanko · 11y ago · 0 comments
With manual daemonization, the process can delay forking until it has ensured that its configuration is sound and it has the resources it needs. This way the parent process can indicate with its exit status whether the service was successfully launched.
Only once the grandchild (not the child, you must double-fork in order to start up correctly) has indicated to the initial process that it is ready to provide the service, should the initial process exit, cleanly, thereby notifying systemd that startup was successful.
See daemon(7) for the full details.
And now i ponder likening systemd with CISC...