[Zope-Coders] extra-clean shutdown, signal handling

Matthew T. Kromer matt@zope.com
Wed, 30 Oct 2002 11:58:01 -0500


Guido van Rossum wrote:

>>>[Quoting Toby Dickenson, I think]
>>>

>>>This ended up writing the child process's pid to the pid_file, rather
>>>than the zdaemon process manager's pid.  Does anyone understand why
>>>zdaemon does fork+fork+exec rather than just fork+fork?
>>>      
>>>

This may have been answered already but ... typically a dual fork is 
used to get a new process group id. It is a very old convention, and I 
dont know that zdaemon is even doing it right.  Now you typically see a 
fork() setpgrp() fork() exec() or similar.   The whole intent is to 
disassociate yourself from your parent and become a daemon.

-- 
Matt Kromer
Zope Corporation  http://www.zope.com/