httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: child_exit
Date Tue, 17 Mar 1998 00:08:52 GMT


On Tue, 17 Mar 1998, Doug MacEachern wrote:

> so, we don't need child_exit because we can just use register_cleanup
> with the pool who has a lifetime of the child (is there a name for
> that?).

pchild, but you're not touching that.  It's local to http_main.  modules
get passed it as the parameter to child_init(), save that if you need it. 

> Why not keep the child_exit hook for modules (in the module
> structure), but add a child_init to core_module which registers a
> cleanup that will invoke child_exit_modules()?  This way, modules who
> are using child_exit don't need to change, and plugin developers who
> want child_exit-ness can avoid the awkwardness of using
> register_cleanup().

But child_exit is a new function for 1.3, and MODULE_MAGIC_NUMBER lets
folks do things whatever way they need to... and the php, jserv, and perl
folks are all here on this list reading this and cursing me :)

If we're going to keep the child_exit method, why should we complicate how
we invoke it?

What is awkward about register_cleanup()? 

There are cases where modules absolutely have to use this function instead
of child_exit because cleanups give you a chance to cleanup across
fork()... yet another reason that child_exit() is not a useful addition to
the API.  I should have been far more adamant with my complaints way back
when this method went into the API.

Dean

> I've done this with mod_perl and it seems to work just fine.
> 
> -Doug
> 
> 


Mime
View raw message