Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 60385 invoked from network); 1 Jun 2007 17:58:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jun 2007 17:58:55 -0000 Received: (qmail 68366 invoked by uid 500); 1 Jun 2007 17:58:59 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 68274 invoked by uid 500); 1 Jun 2007 17:58:58 -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 68263 invoked by uid 99); 1 Jun 2007 17:58:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 10:58:58 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 10:58:54 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 4BB211A981A; Fri, 1 Jun 2007 10:58:34 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r543556 - in /apr/apr/branches/1.2.x/file_io: netware/mktemp.c unix/mktemp.c Date: Fri, 01 Jun 2007 17:58:34 -0000 To: commits@apr.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070601175834.4BB211A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wrowe Date: Fri Jun 1 10:58:33 2007 New Revision: 543556 URL: http://svn.apache.org/viewvc?view=rev&rev=543556 Log: Register a cleanup only if APR_FILE_NOCLEANUP was not flagged. Submitted by: Brian J. France Reviewed by: wrowe, bojan Backport: 543555 Modified: apr/apr/branches/1.2.x/file_io/netware/mktemp.c apr/apr/branches/1.2.x/file_io/unix/mktemp.c Modified: apr/apr/branches/1.2.x/file_io/netware/mktemp.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/file_io/netware/mktemp.c?view=diff&rev=543556&r1=543555&r2=543556 ============================================================================== --- apr/apr/branches/1.2.x/file_io/netware/mktemp.c (original) +++ apr/apr/branches/1.2.x/file_io/netware/mktemp.c Fri Jun 1 10:58:33 2007 @@ -41,9 +41,12 @@ if ((rv = apr_file_open(fp, template, flags|APR_FILE_NOCLEANUP, APR_UREAD | APR_UWRITE, p)) == APR_SUCCESS) { - apr_pool_cleanup_register((*fp)->pool, (void *)(*fp), - apr_unix_file_cleanup, - apr_unix_child_file_cleanup); + + if (!(flags & APR_FILE_NOCLEANUP)) { + apr_pool_cleanup_register((*fp)->pool, (void *)(*fp), + apr_unix_file_cleanup, + apr_unix_child_file_cleanup); + } } return rv; Modified: apr/apr/branches/1.2.x/file_io/unix/mktemp.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/file_io/unix/mktemp.c?view=diff&rev=543556&r1=543555&r2=543556 ============================================================================== --- apr/apr/branches/1.2.x/file_io/unix/mktemp.c (original) +++ apr/apr/branches/1.2.x/file_io/unix/mktemp.c Fri Jun 1 10:58:33 2007 @@ -202,9 +202,11 @@ apr_os_file_put(fp, &fd, flags, p); (*fp)->fname = apr_pstrdup(p, template); - apr_pool_cleanup_register((*fp)->pool, (void *)(*fp), - apr_unix_file_cleanup, - apr_unix_child_file_cleanup); + if (!(flags & APR_FILE_NOCLEANUP)) { + apr_pool_cleanup_register((*fp)->pool, (void *)(*fp), + apr_unix_file_cleanup, + apr_unix_child_file_cleanup); + } #endif return APR_SUCCESS; }