From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23572 invoked by alias); 8 Aug 2013 07:24:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23535 invoked by uid 89); 8 Aug 2013 07:24:38 -0000 X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 08 Aug 2013 07:24:37 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1V7KaE-0000EB-62 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 08 Aug 2013 00:24:30 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 8 Aug 2013 00:24:30 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Thu, 8 Aug 2013 00:24:29 -0700 Message-ID: <5203477B.8090203@codesourcery.com> Date: Thu, 08 Aug 2013 07:24:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Subject: Re: [PATCH 1/3] Detect GDB is in cygwin References: <83txjdxtpd.fsf@gnu.org> <51F786CB.3020700@codesourcery.com> <83a9l4xdst.fsf@gnu.org> <51FA137B.6070207@codesourcery.com> <20130803045452.GA997@ednor.casa.cgf.cx> <51FE1493.9070707@codesourcery.com> <20130805044122.GA1825@ednor.casa.cgf.cx> <51FF4483.5000102@codesourcery.com> <20130806020839.GA3362@ednor.casa.cgf.cx> <520067CB.4000300@codesourcery.com> <20130808051114.GA1553@ednor.casa.cgf.cx> In-Reply-To: <20130808051114.GA1553@ednor.casa.cgf.cx> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-08/txt/msg00233.txt.bz2 On 08/08/2013 01:11 PM, Christopher Faylor wrote: > If you're just going to always set to unbuffered when something > is a pipe, why not just check for a pipe using GetFileType? Then > you don't have to try to use an undocumented Cygwin behaviour. What I am going to do is to set stdout/stderr unbuffered if we can detect that GDB is running in cygwin, with tty allocated or without tty allocated. We'd like to restrict this behaviour change only when mingw gdb is running in cygwin. We don't want to change the behaviour on native windows, so we have to rely on this Cygwin behaviour. -- Yao (齐尧)