Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 75002 invoked from network); 31 Jan 2010 16:29:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Jan 2010 16:29:49 -0000 Received: (qmail 30983 invoked by uid 500); 31 Jan 2010 16:29:49 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 30894 invoked by uid 500); 31 Jan 2010 16:29:49 -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 30885 invoked by uid 99); 31 Jan 2010 16:29:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Jan 2010 16:29:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Jan 2010 16:29:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2B8C623889E3; Sun, 31 Jan 2010 16:29:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r905067 - in /apr/apr/branches/1.3.x: ./ CHANGES file_io/unix/open.c Date: Sun, 31 Jan 2010 16:29:28 -0000 To: commits@apr.apache.org From: jorton@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100131162928.2B8C623889E3@eris.apache.org> Author: jorton Date: Sun Jan 31 16:29:27 2010 New Revision: 905067 URL: http://svn.apache.org/viewvc?rev=905067&view=rev Log: Merge r905040 from trunk: * file_io/unix/open.c (apr_file_open): Don't set FD_CLOEXEC if it was already set via O_CLOEXEC. PR: 46297 Modified: apr/apr/branches/1.3.x/ (props changed) apr/apr/branches/1.3.x/CHANGES apr/apr/branches/1.3.x/file_io/unix/open.c Propchange: apr/apr/branches/1.3.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Jan 31 16:29:27 2010 @@ -1,2 +1,2 @@ /apr/apr/branches/1.4.x:783970 -/apr/apr/trunk:712674,733052,742752,747990,748361,748371,748565,748988,749810,782838,783398,783958,788588,794485,795267,799497,800627,809854,829490,831641 +/apr/apr/trunk:712674,733052,742752,747990,748361,748371,748565,748988,749810,782838,783398,783958,788588,794485,795267,799497,800627,809854,829490,831641,905040 Modified: apr/apr/branches/1.3.x/CHANGES URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/CHANGES?rev=905067&r1=905066&r2=905067&view=diff ============================================================================== --- apr/apr/branches/1.3.x/CHANGES [utf-8] (original) +++ apr/apr/branches/1.3.x/CHANGES [utf-8] Sun Jan 31 16:29:27 2010 @@ -1,6 +1,9 @@ - -*- coding: utf-8 -*- + -*- coding: utf-8 -*- Changes for APR 1.3.10 + *) Avoid a redundant fcntl() call in apr_file_open() where O_CLOEXEC + is supported. PR 46297. [Joe Orton] + *) Solaris 10 and later: Change the default cross-mutex mechanism from fcntl to pthread to resolve EDEADLK failures with some multi-threaded, multi-process applications (e.g., httpd's worker MPM with certain Modified: apr/apr/branches/1.3.x/file_io/unix/open.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/file_io/unix/open.c?rev=905067&r1=905066&r2=905067&view=diff ============================================================================== --- apr/apr/branches/1.3.x/file_io/unix/open.c (original) +++ apr/apr/branches/1.3.x/file_io/unix/open.c Sun Jan 31 16:29:27 2010 @@ -176,9 +176,11 @@ if ((flags = fcntl(fd, F_GETFD)) == -1) return errno; - flags |= FD_CLOEXEC; - if (fcntl(fd, F_SETFD, flags) == -1) - return errno; + if ((flags & FD_CLOEXEC) == 0) { + flags |= FD_CLOEXEC; + if (fcntl(fd, F_SETFD, flags) == -1) + return errno; + } } (*new) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));