[mod_python] Re: forks, daemons, and other beasts

Graham Dumpleton grahamd at dscpl.com.au
Sat Feb 11 23:32:03 EST 2006

On 12/02/2006, at 2:55 PM, Barry Burns wrote:

>> The documentation for thread says that
>> When the main thread exits, it is system defined whether the other
>> threads survive. On SGI IRIX using the native thread implementation,
>> they survive. On most other systems, they are killed without  
>> executing
>> try ... finally clauses or executing object destructors.
>> I tested this and indeed whatever is called with
>> thread.start_new_thread it will die if execution reaches the end of
>> the original program.
> This may be completely off, but how about sending the notification,  
> closing the connection to the client, then unzipping in the same  
> thread?

I doubt the client socket connection would be closed off if one did that
and if no content length was specified, the client browser would  
hang waiting for socket connection to close and thus would not  
render what it had already received. In other words, the content handler
has to return for socket connection to get closed off. That is also  
that keep alive is not enabled.


More information about the Mod_python mailing list