DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12757>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12757 mod_ldap cache tries to open an existing shared memory file ------- Additional Comments From [EMAIL PROTECTED] 2003-01-10 22:58 ------- Actually, wouldn't it be better to just attach to the named file? I implemented something like this: cvs diff -c util_ldap_cache.c Index: util_ldap_cache.c =================================================================== RCS file: /usr/src/cvs/cvsroot/contrib/Apache/modules/experimental/util_ldap_cache.c,v retrieving revision 1.1.1.1 diff -c -r1.1.1.1 util_ldap_cache.c *** util_ldap_cache.c 8 Oct 2002 20:49:28 -0000 1.1.1.1 --- util_ldap_cache.c 10 Jan 2003 22:55:51 -0000 *************** *** 296,304 **** apr_status_t result; result = apr_shm_create(&util_ldap_shm, reqsize, "/tmp/ldap_cache", pool); ! if (result != APR_SUCCESS) { return result; - } /* This will create a rmm "handler" to get into the shared memory area */ apr_rmm_init(&util_ldap_rmm, NULL, --- 296,310 ---- apr_status_t result; result = apr_shm_create(&util_ldap_shm, reqsize, "/tmp/ldap_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, "/tmp/ldap_cache", pool); ! } ! if (result != APR_SUCCESS) return result; /* This will create a rmm "handler" to get into the shared memory area */ apr_rmm_init(&util_ldap_rmm, NULL, and it seems to work for me. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
