On 04/01/2011 09:25 PM, [email protected] wrote: > Author: jim > Date: Fri Apr 1 19:25:19 2011 > New Revision: 1087862 > > URL: http://svn.apache.org/viewvc?rev=1087862&view=rev > Log: > More cleanups at cleanup... move to using pconf and then remove > any file-based shms > > Modified: > httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c > > Modified: httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c?rev=1087862&r1=1087861&r2=1087862&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c (original) > +++ httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c Fri Apr 1 19:25:19 > 2011 > @@ -57,6 +57,7 @@ typedef struct { > > struct ap_slotmem_instance_t { > char *name; /* per segment name */ > + int fbased; /* filebased? */ > void *shm; /* ptr to memory segment (apr_shm_t *) > */ > void *base; /* data set start */ > apr_pool_t *gpool; /* per segment global pool */ > @@ -211,12 +212,15 @@ static apr_status_t cleanup_slotmem(void > if (AP_SLOTMEM_IS_PERSIST(next)) { > store_slotmem(next); > } > + if (next->fbased) { > + apr_shm_remove(next->name, next->gpool); > + }
Why is this needed? Doesn't do apr_shm_destroy this automatically? > @@ -436,6 +443,7 @@ static apr_status_t slotmem_attach(ap_sl > res = (ap_slotmem_instance_t *) apr_pcalloc(gpool, > > sizeof(ap_slotmem_instance_t)); > res->name = apr_pstrdup(gpool, fname); > + res->fbased = 1; Why is this always fbased? Regards RĂ¼diger
