[mod_python] Child shutdowns?

Barry Warsaw barry at python.org
Fri Aug 29 17:47:20 EST 2003


On Fri, 2003-08-29 at 17:11, Gregory (Grisha) Trubetskoy wrote:
> Barry
> 
> If I remember this correctly, from the viewpoint of Apache, to create a
> server object (or server_rec structure) you need to have a request,
> because a server is created based on what the "Host:" header says (if it
> is there at all) and by then going throught the config to see if there is
> anything relevant. Once a server is created, it is cached and reused, but
> it is not created at Apache startup (as an extreme example, mod_vhost
> allows you to create an unlimited number of virtual servers without
> specifying them in the config at all - so there is no way to know what the
> server name is until a request for it comes in).
> 
> I don't know if Apache provides a way to do something at server creation
> time, I'll check it out, but it's unlikely. For right now, the only way to
> register a server cleanup is from within a request :-(

Thanks Grisha, both for the info and the offer to poke around.  I'll try
pushing my startup code into my request handler, and see if registering
my cleanup code at that time will work.

Cheers,
-Barry




More information about the Mod_python mailing list