On Thu, Jan 29, 2009 at 09:39:57AM +0100, Pierre Chifflier wrote: > This is right, the first process forks and exits (so it does not get the > return code). Suggestions accepted for a better way.
Do the complete initialization (all things needed to pass the "no options left but kill ourself") first and then fork. That way if the process finds out there's a fatal error and it needs to commit suicide, a proper exit code can be returned. This should hopefully just be moving code around, but care is needed to not create bugs. Maybe it's better postpone this, because I think the issue is less severe if there's proper pidfile handling in place so init scripts can query the state properly... (Forking early might speed up the boot process, but that should really be fixed up with a proper init that can start up stuff in parallell. I can't see any other advantage of forking before initialization is complete.) Thanks for taking care of this! -- Andreas Henriksson -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org