Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 34549 invoked from network); 23 Aug 2010 17:32:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Aug 2010 17:32:11 -0000 Received: (qmail 20692 invoked by uid 500); 23 Aug 2010 17:32:11 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 20625 invoked by uid 500); 23 Aug 2010 17:32:10 -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 20618 invoked by uid 99); 23 Aug 2010 17:32:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 17:32:10 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,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 ESMTP; Mon, 23 Aug 2010 17:32:02 +0000 Received: from mxscanout.iskon.hr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id F1229CB198 for ; Mon, 23 Aug 2010 19:31:39 +0200 (CEST) Received: from mx.iskon.hr (unknown [213.191.142.124]) by mxscanout.iskon.hr (Postfix) with SMTP id CC6F6CAFB1 for ; Mon, 23 Aug 2010 19:31:38 +0200 (CEST) Received: (qmail 15911 invoked from network); 23 Aug 2010 19:31:38 +0200 X-AVScan: ClamAV X-Remote-IP: 89.164.18.57 Received: from 18-57.dsl.iskon.hr (HELO es55x86w0.jboss.hr) (89.164.18.57) by mx.iskon.hr with SMTP; 23 Aug 2010 19:31:38 +0200 Message-ID: <4C72B095.4020005@apache.org> Date: Mon, 23 Aug 2010 19:32:05 +0200 From: Mladen Turk User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: dev@apr.apache.org Subject: Re: Multiple use of apr_initialize, apr_pool_create_ex and apr_dbm_open_ex References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: IskonProtect X-PerlMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, BODY_SIZE_800_899 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' On 08/23/2010 04:53 PM, Christian K. wrote: > Hello, > > > In this application I want to write a dbm file, to use for HTTPD > authentication. Since I do not want to make any assumption on the > initialization state of apr I would like to repeatedly initialize and > terminate apr. IMHO this is API misuse. It's not a problem if you call apr_initialize or apr_terminate multiple times, since only the first and last will actually do the job (although they are not thread safe). However apr_terminate is meant to be used at process exit as a top level cleanup. See: http://apr.apache.org/docs/apr/1.4/group__apr__library.html It clearly states that apr_initialize/apr_terminate should be used as entry and exit point to the *library* (which usually translates to a single calls per process life time) Regards -- ^TM