> No need to mix doubleforking and PID tracking on your > program. That should be the duty of whatever daemonizes and manages > your program. You know, like Daemontools or s6.
So there is a very good reason for a deamon to handle its own backgrounding: The sensible convention is it that it should only background at the instant where it is ready to service requests: If there is a long initialisation phase it should stay in the foreground - so that things that depend on it in turn do not get started too soon. A more detailed description of this problem I wrote up a while ago at welz.org.za/notes/on-starting-daemons.html. More fundamentally: If an application has problems calling the a daemonize() or fork_parent() function or the handful of system calls that make up this, then maybe this a limitation of the development environment or language - if calling these this is regarded to be hard then one wonders how reliable the rest of the program is. regards marc _______________________________________________ Dng mailing list [email protected] https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
