multiple processes: but one module init needed

2009-01-25 Thread fka...@googlemail.com
Hi all, some of the initialization tasks of my module must not be done repeatedly with each spawned server process. Currently I init my module by ap_hook_child_init() and do cleaning up by apr_pool_cleanup_register(), so each spawned server process inits my module again. Do I have to do IPC

Re: multiple processes: but one module init needed

2009-01-25 Thread Saju Pillai
fka...@googlemail.com wrote: Hi all, some of the initialization tasks of my module must not be done repeatedly with each spawned server process. The post_config hook may help you. Currently I init my module by ap_hook_child_init() and do cleaning up by apr_pool_cleanup_register(), so each

Re: multiple processes: but one module init needed

2009-01-25 Thread fka...@googlemail.com
Saju Pillai: fka...@googlemail.com wrote: Hi all, some of the initialization tasks of my module must not be done repeatedly with each spawned server process. The post_config hook may help you. Thanks -- but in what way? Even with this hook my module gets called for *each* spawned

Re: multiple processes: but one module init needed

2009-01-25 Thread fka...@googlemail.com
fka...@googlemail.com: some of the initialization tasks of my module must not be done repeatedly with each spawned server process. To be more precise: There is only *one* vhost/configuration here, however, due to the mpm settings (see below) apache launches *several* processes to serve it --

Re: multiple processes: but one module init needed

2009-01-25 Thread Saju Pillai
fka...@googlemail.com wrote: fka...@googlemail.com: some of the initialization tasks of my module must not be done repeatedly with each spawned server process. To be more precise: There is only *one* vhost/configuration here, however, due to the mpm settings (see below) apache launches

Re: multiple processes: but one module init needed

2009-01-25 Thread fka...@googlemail.com
Saju Pillai: Look at http://wiki.apache.org/httpd/ModuleLife to see how to make init code run only once from post_config How cool. That explains everything... Thank You!! Felix

Re: multiple processes: but one module init needed

2009-01-25 Thread Sander Temme
On Jan 25, 2009, at 12:35 AM, fka...@googlemail.com wrote: some of the initialization tasks of my module must not be done repeatedly with each spawned server process. Currently I init my module by ap_hook_child_init() and do cleaning up by apr_pool_cleanup_register(), so each spawned server

Re: multiple processes: but one module init needed

2009-01-25 Thread Eric Covener
On Sun, Jan 25, 2009 at 11:31 AM, Sander Temme scte...@apache.org wrote: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/examples/mod_example_ipc.c?view=co for an example. The post_config hook is where you want to put your stuff, but yes it does get called twice so you may want to use