From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12746 invoked by alias); 15 Aug 2013 17:40:14 -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 12736 invoked by uid 89); 15 Aug 2013 17:40:14 -0000 X-Spam-SWARE-Status: No, score=-50.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.2 Received: from mho-02-ewr.mailhop.org (HELO mho-02-ewr.mailhop.org) (204.13.248.72) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 15 Aug 2013 17:40:13 +0000 Received: from pool-173-48-46-190.bstnma.fios.verizon.net ([173.48.46.190] helo=cgf.cx) by mho-02-ewr.mailhop.org with esmtpa (Exim 4.72) (envelope-from ) id 1VA1Wt-0009zg-WD; Thu, 15 Aug 2013 17:40:12 +0000 Received: from localhost (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id E64CA60117; Thu, 15 Aug 2013 13:40:10 -0400 (EDT) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/TidbzEsyTj352znyUKSB0 Date: Thu, 15 Aug 2013 17:40:00 -0000 From: Christopher Faylor To: gdb-patches@sourceware.org, Yao Qi Subject: Re: [PATCH 1/3] Detect GDB is in cygwin Message-ID: <20130815174010.GB6955@ednor.casa.cgf.cx> Mail-Followup-To: gdb-patches@sourceware.org, Yao Qi References: <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> <5203477B.8090203@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5203477B.8090203@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-SW-Source: 2013-08/txt/msg00401.txt.bz2 On Thu, Aug 08, 2013 at 03:23:39PM +0800, Yao Qi wrote: >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. You've already acknowledged that your code will decide to become unbuffered whether you are running on a cygwin pipe or cygwin pty. What is special about cygwin pipes that makes you want to make them unbuffered while ignoring normal Windows pipes? Can you explain *why* you don't want to change the behavior on native windows? I really don't like having gdb rely on undocumented Cygwin behavior. You're introducing a tenuous dependency between the way Cygwin creates ptys and pipes which could easily break if we decide to change something in Cygwin. cgf