Changes with Apache 2.0.45
+ *) Fix mod_ldap to open an existing shared memory file should one
+ already exist. PR 12757. [Scooter Morris <scooter@gene.com>,
+ Graham Leggett]
+
*) Fix the ulimit command used by apachectl on Tru64. PR 13609.
[Joseph Senulis <Joseph.Senulis@dnr.state.wi.us>, Jeff Trawick]
#ifdef APU_HAS_LDAP
-
+#define MODLDAP_SHMEM_CACHE "/tmp/mod_ldap_cache"
/* ------------------------------------------------------------------ */
#if APR_HAS_SHARED_MEMORY
apr_status_t result;
- result = apr_shm_create(&util_ldap_shm, reqsize, "/tmp/ldap_cache", pool);
+ result = apr_shm_create(&util_ldap_shm, reqsize, MODLDAP_SHMEM_CACHE, pool);
+ if (result == EEXIST) {
+ /*
+ * The cache could have already been created (i.e. we may be a child process). See
+ * if we can attach to the existing shared memory
+ */
+ result = apr_shm_attach(&util_ldap_shm, MODLDAP_SHMEM_CACHE, pool);
+ }
if (result != APR_SUCCESS) {
return result;
}