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 1D66D10889 for ; Wed, 6 Nov 2013 21:05:05 +0000 (UTC) Received: (qmail 77299 invoked by uid 500); 6 Nov 2013 21:05:05 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 77231 invoked by uid 500); 6 Nov 2013 21:05:05 -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 77223 invoked by uid 99); 6 Nov 2013 21:05:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Nov 2013 21:05:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Wed, 06 Nov 2013 21:05:01 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E078323889CB; Wed, 6 Nov 2013 21:04:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1539462 - in /apr/apr/branches/1.5.x: ./ CHANGES file_io/win32/filedup.c Date: Wed, 06 Nov 2013 21:04:40 -0000 To: commits@apr.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131106210440.E078323889CB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: trawick Date: Wed Nov 6 21:04:40 2013 New Revision: 1539462 URL: http://svn.apache.org/r1539462 Log: Merge r1539455 from trunk: apr_file_dup2() on Windows: Fix debug RTL assertion when attempting to _commit(stdout) or _commit(stderr). Submitted by: Mike Rumph Reviewed by trawick, who adjusted the patch to remove the existing _commit(stdin) Modified: apr/apr/branches/1.5.x/ (props changed) apr/apr/branches/1.5.x/CHANGES apr/apr/branches/1.5.x/file_io/win32/filedup.c Propchange: apr/apr/branches/1.5.x/ ------------------------------------------------------------------------------ Merged /apr/apr/trunk:r1539455 Modified: apr/apr/branches/1.5.x/CHANGES URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/CHANGES?rev=1539462&r1=1539461&r2=1539462&view=diff ============================================================================== --- apr/apr/branches/1.5.x/CHANGES [utf-8] (original) +++ apr/apr/branches/1.5.x/CHANGES [utf-8] Wed Nov 6 21:04:40 2013 @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes for APR 1.5.0 + *) apr_file_dup2() on Windows: Fix debug RTL assertion in when + attempting to _commit(stdout) or _commit(stderr). [Mike Rumph + ] + *) apr_socket_connect() on Windows: Handle WSAEISCONN. PR 48736. [, Jeff Trawick] Modified: apr/apr/branches/1.5.x/file_io/win32/filedup.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/file_io/win32/filedup.c?rev=1539462&r1=1539461&r2=1539462&view=diff ============================================================================== --- apr/apr/branches/1.5.x/file_io/win32/filedup.c (original) +++ apr/apr/branches/1.5.x/file_io/win32/filedup.c Wed Nov 6 21:04:40 2013 @@ -88,7 +88,9 @@ APR_DECLARE(apr_status_t) apr_file_dup2( */ fflush(stderr); setvbuf(stderr, NULL, _IONBF, 0); - _commit(2 /* stderr */); + if (!_isatty(2)) { + _commit(2 /* stderr */); + } /* Clone a handle can _close() without harming the source handle, * open an MSVCRT-based pseudo-fd for the file handle, then dup2 @@ -118,7 +120,9 @@ APR_DECLARE(apr_status_t) apr_file_dup2( /* For the process flow see the stderr case above */ fflush(stdout); setvbuf(stdout, NULL, _IONBF, 0); - _commit(1 /* stdout */); + if (!_isatty(1)) { + _commit(1 /* stdout */); + } if (!DuplicateHandle(hproc, old_file->filehand, hproc, &newhand, 0, FALSE, DUPLICATE_SAME_ACCESS)) { @@ -134,7 +138,6 @@ APR_DECLARE(apr_status_t) apr_file_dup2( /* For the process flow see the stderr case above */ fflush(stdin); setvbuf(stdin, NULL, _IONBF, 0); - _commit(0 /* stdin */); if (!DuplicateHandle(hproc, old_file->filehand, hproc, &newhand, 0, FALSE, DUPLICATE_SAME_ACCESS)) {