Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 46076 invoked from network); 17 Jul 2008 10:25:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jul 2008 10:25:55 -0000 Received: (qmail 29681 invoked by uid 500); 17 Jul 2008 10:25:54 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 29633 invoked by uid 500); 17 Jul 2008 10:25:54 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 29621 invoked by uid 99); 17 Jul 2008 10:25:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jul 2008 03:25:53 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [213.191.128.81] (HELO mxout2.iskon.hr) (213.191.128.81) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 17 Jul 2008 10:24:58 +0000 Received: (qmail 3511 invoked from network); 17 Jul 2008 12:25:20 +0200 X-Remote-IP: 213.191.142.124 Received: from unknown (HELO mx.iskon.hr) (213.191.142.124) by mxout2.iskon.hr with SMTP; 17 Jul 2008 12:25:20 +0200 Received: (qmail 13990 invoked from network); 17 Jul 2008 12:25:20 +0200 X-AVScan: ClamAV X-Remote-IP: 89.164.20.21 Received: from 20-21.dsl.iskon.hr (HELO ?192.168.0.10?) (89.164.20.21) by mx.iskon.hr with SMTP; 17 Jul 2008 12:25:20 +0200 Message-ID: <487F1E0A.2040102@apache.org> Date: Thu, 17 Jul 2008 12:25:14 +0200 From: Mladen Turk User-Agent: Thunderbird 1.5.0.12 (X11/20071129) MIME-Version: 1.0 To: Bojan Smojver CC: dev@apr.apache.org Subject: Re: svn commit: r677505 - /apr/apr-util/trunk/misc/apr_reslist.c References: <20080717054557.AA2E02388A45@eris.apache.org> <20080717195057.213327svh8rbt1xc@www.rexursive.com> In-Reply-To: <20080717195057.213327svh8rbt1xc@www.rexursive.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Bojan Smojver wrote: > Quoting mturk@apache.org: > >> Use apr_pool_pre_cleanup_register for reslist cleanup > > After thinking about this a bit more, this patch may introduce a > somewhat unusual (possibly even dangerous) behaviour, as it changes the > way cleanups normally work with APR pools. > It only forces calling resource destructors before its subpools are destroyed. The operation is exactly the same as if one would explicitly call destructors for each resource before calling pool_destroy. So the pool P is not destroyed before its subpools, only the callback is called before subpools are destroyed. The standard cleanup on pool_clear(destroy) first destroys all subpools and then call register cleanups. This forces (just look at mod_proxy connection pool code) the user to make some tricks so it can figure out weather the destructor was called by invalidate or by pool destroy. If it was by pool destroy then it must skip any subpool destroy calls, because those would cause core. Regards -- ^TM