You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Michael H. Voase" <mv...@midcoast.com.au> on 1999/06/19 17:12:49 UTC

[PATCH] module port to 2.0

Dean Gaudet wrote:
> 
> Yup, use a child_init_hook and ap_register_cleanup(pconf, foo) and you'll
> get picked up at child exit time.
> 

Hmm ... OK I can see the logic behind this . This works out
fairly nice actually . The current code only allows for one
parameter to be passed to the module exit code . The legacy
code passed ( server_rec * , pool * ) , however correct exit
code only needs server_rec . If exit code is allocating memory
at exit time then it probably should be looked at for overhaul *-( . 
( mod_log_config turned out to be trivial since although it
took a pool parameter in the function , it never actually
used it ;) 

	The following patches just make the modules build nice
under MPM . They are not tested . Of note , I did not include
mod_status since there is more work to be done on 
http_config_globals.h . Aside from that , the default build
for mpm except for mod_status should build clean .

Cheers Mik Voase.

> Dean
> 
> On 18 Jun 1999 tvaughan@aventail.com wrote:
> 
> > I think the preferred method is to use ap_register_cleanup.
> >

> > Tom Vaughan <tvaughan at aventail dot com>
> >

-- 
----------------------------------------------------------------------------
 /~\     /~\            CASTLE INDUSTRIES PTY. LTD.
 | |_____| |            Incorporated 1969. in N.S.W., Australia
 |         |            Phone +612 6567 1227 Fax +612 6567 1449
 |   /~\   |            Web http://www.midcoast.com.au/~mvoase
 |   [ ]   |            Michael H. Voase.  Director.
~~~~~~~~~~~~~~          Castle Industries - Industrial Strength
Solutions.
----------------------------------------------------------------------------

Re: [PATCH] module port to 2.0

Posted by Dean Gaudet <dg...@arctic.org>.
thanks for the patch, applied.

On Sat, 19 Jun 1999, Michael H. Voase wrote:

> Dean Gaudet wrote:
> > 
> > Yup, use a child_init_hook and ap_register_cleanup(pconf, foo) and you'll
> > get picked up at child exit time.
> > 
> 
> Hmm ... OK I can see the logic behind this . This works out
> fairly nice actually . The current code only allows for one
> parameter to be passed to the module exit code . The legacy
> code passed ( server_rec * , pool * ) , however correct exit
> code only needs server_rec . If exit code is allocating memory
> at exit time then it probably should be looked at for overhaul *-( . 
> ( mod_log_config turned out to be trivial since although it
> took a pool parameter in the function , it never actually
> used it ;) 

if you needed more data you can do this for example:

struct my_struct {
    server_rec *s;
    pool *p;
};

then pass in a pointer to my_struct in the void *... 

Dean