Return-Path: X-Original-To: apmail-apr-commits-archive@www.apache.org Delivered-To: apmail-apr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 027C519DD4 for ; Wed, 13 Apr 2016 11:58:11 +0000 (UTC) Received: (qmail 20697 invoked by uid 500); 13 Apr 2016 11:58:10 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 20640 invoked by uid 500); 13 Apr 2016 11:58:10 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 20631 invoked by uid 99); 13 Apr 2016 11:58:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Apr 2016 11:58:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 218DCC0C72 for ; Wed, 13 Apr 2016 11:58:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.799 X-Spam-Level: * X-Spam-Status: No, score=1.799 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id CWkTJS7RKOc5 for ; Wed, 13 Apr 2016 11:58:09 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 04DB05F474 for ; Wed, 13 Apr 2016 11:58:09 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DCE32E019D for ; Wed, 13 Apr 2016 11:58:07 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 4BC3F3A0313 for ; Wed, 13 Apr 2016 11:58:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1738926 - in /apr/apr/trunk: CHANGES locks/unix/proc_mutex.c Date: Wed, 13 Apr 2016 11:58:06 -0000 To: commits@apr.apache.org From: ylavic@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160413115807.4BC3F3A0313@svn01-us-west.apache.org> Author: ylavic Date: Wed Apr 13 11:58:06 2016 New Revision: 1738926 URL: http://svn.apache.org/viewvc?rev=1738926&view=rev Log: 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. Modified: apr/apr/trunk/CHANGES apr/apr/trunk/locks/unix/proc_mutex.c Modified: apr/apr/trunk/CHANGES URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=1738926&r1=1738925&r2=1738926&view=diff ============================================================================== --- apr/apr/trunk/CHANGES [utf-8] (original) +++ apr/apr/trunk/CHANGES [utf-8] Wed Apr 13 11:58:06 2016 @@ -1,6 +1,11 @@ -*- coding: utf-8 -*- Changes for APR 2.0.0 + *) 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. [Yann Ylavic] + *) apr_os_proc_mutex_put_ex: Allow to specify whether the OS native mutex should or not be cleaned up (destroyed) with the constructed APR mutex (given pool), and default to not for the simple _put() Modified: apr/apr/trunk/locks/unix/proc_mutex.c URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/unix/proc_mutex.c?rev=1738926&r1=1738925&r2=1738926&view=diff ============================================================================== --- apr/apr/trunk/locks/unix/proc_mutex.c (original) +++ apr/apr/trunk/locks/unix/proc_mutex.c Wed Apr 13 11:58:06 2016 @@ -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 || \