diff options
author | Yann Ylavic <ylavic@apache.org> | 2016-04-13 11:58:06 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2016-04-13 11:58:06 +0000 |
commit | 1ac73768011d2bade4b8b0fa55612d8640ce2956 (patch) | |
tree | ebb896b0f36a819a5dcb9e576cc908273773c714 /locks | |
parent | 391dd40f45fbcac7eef01698c5aacbb426e5dd17 (diff) | |
download | apr-1ac73768011d2bade4b8b0fa55612d8640ce2956.tar.gz |
apr_os_proc_mutex-unix: For consistency with other OS native to APR
types constructors/_put()ers and non-unix mutex mechanisms, always
destroy the underlying native mutex when apr_proc_mutex_destroy() is
called explicitly.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1738926 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks')
-rw-r--r-- | locks/unix/proc_mutex.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/locks/unix/proc_mutex.c b/locks/unix/proc_mutex.c index 93df3ad27..e29978a07 100644 --- a/locks/unix/proc_mutex.c +++ b/locks/unix/proc_mutex.c @@ -23,7 +23,11 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_destroy(apr_proc_mutex_t *mutex) { - return apr_pool_cleanup_run(mutex->pool, mutex, apr_proc_mutex_cleanup); + apr_status_t rv = apr_proc_mutex_cleanup(mutex); + if (rv == APR_SUCCESS) { + apr_pool_cleanup_kill(mutex->pool, mutex, apr_proc_mutex_cleanup); + } + return rv; } #if APR_HAS_POSIXSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || \ |