https://issues.apache.org/bugzilla/show_bug.cgi?id=49504

--- Comment #11 from Yann Ylavic <[email protected]> ---
(In reply to Yann Ylavic from comment #10)
> Yet another possibility would be to not call pthread_mutex_destroy() in
> proc_mutex_proc_pthread_cleanup(), only munmap()ing the region

proc_mutex_proc_pthread_cleanup() could also destroy a copy of the
pthread_mutex_t, eg.

Index: locks/unix/proc_mutex.c
===================================================================
--- locks/unix/proc_mutex.c    (revision 1568989)
+++ locks/unix/proc_mutex.c    (working copy)
@@ -347,7 +347,8 @@ static apr_status_t proc_mutex_proc_pthread_cleanu
     }
     /* curr_locked is set to -1 until the mutex has been created */
     if (mutex->curr_locked != -1) {
-        if ((rv = pthread_mutex_destroy(mutex->pthread_interproc))) {
+        pthread_mutex_t copy = *mutex->pthread_interproc;
+        if ((rv = pthread_mutex_destroy(&copy))) {
 #ifdef HAVE_ZOS_PTHREADS
             rv = errno;
 #endif

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to