Author: jfrederic.clere(a)jboss.com
Date: 2008-05-15 02:35:57 -0400 (Thu, 15 May 2008)
New Revision: 1603
Modified:
trunk/mod_cluster/native/mod_slotmem/mod_sharedmem.c
Log:
Only install the cleanup in the second round of post_config.
Modified: trunk/mod_cluster/native/mod_slotmem/mod_sharedmem.c
===================================================================
--- trunk/mod_cluster/native/mod_slotmem/mod_sharedmem.c 2008-05-14 20:43:46 UTC (rev
1602)
+++ trunk/mod_cluster/native/mod_slotmem/mod_sharedmem.c 2008-05-15 06:35:57 UTC (rev
1603)
@@ -33,6 +33,16 @@
/* make sure the shared memory is cleaned */
static int initialize_cleanup(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
server_rec *s)
{
+ void *data;
+ const char *userdata_key = "mod_sharedmem_init";
+
+ apr_pool_userdata_get(&data, userdata_key, s->process->pool);
+ if (!data) {
+ apr_pool_userdata_set((const void *)1, userdata_key,
+ apr_pool_cleanup_null, s->process->pool);
+ return OK;
+ }
+
sharedmem_initialize_cleanup(p);
return OK;
}
Show replies by date