On Jan 25, 2009, at 12:35 AM, [email protected] 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 process inits my module again.
See:
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 the
construction in the example module to avoid reallocating certain items.
Do I have to do IPC between my modules (to figure out if the
currently loaded module is in the *first* of the spawend
processes)?
No, just put your init code in the right hook.
S.
--
Sander Temme
[email protected]
PGP FP: 51B4 8727 466A 0BC3 69F4 B7B8 B2BE BC40 1529 24AF