From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27124 invoked by alias); 16 Aug 2013 15:10:19 -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 27111 invoked by uid 89); 16 Aug 2013 15:10:19 -0000 X-Spam-SWARE-Status: No, score=-8.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 16 Aug 2013 15:10:18 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7GFACfg001064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Aug 2013 11:10:13 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r7GFA6UY000608; Fri, 16 Aug 2013 11:10:09 -0400 Message-ID: <520E40CD.7080604@redhat.com> Date: Fri, 16 Aug 2013 15:10:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Eli Zaretskii CC: yao@codesourcery.com, gdb-patches@sourceware.org, brobecker@adacore.com Subject: Re: [PATCH] Unbuffer stdout and stderr on windows References: <51EE23F8.1070905@codesourcery.com> <83wqohw4ee.fsf@gnu.org> <20130729192559.GA5348@ednor.casa.cgf.cx> <83d2q1xiyv.fsf@gnu.org> <51F6C7B2.3020400@redhat.com> <20130731034045.GA5565@ednor.casa.cgf.cx> <20130812211105.GA11128@adacore.com> <8361v9piop.fsf@gnu.org> <20130815173618.GA6955@ednor.casa.cgf.cx> <83eh9uonlg.fsf@gnu.org> <20130815175940.GD6955@ednor.casa.cgf.cx> <520E1109.7000304@redhat.com> <520E1C34.2000907@codesourcery.com> <520E2B13.8020706@redhat.com> <83r4dtn35q.fsf@gnu.org> <520E357E.6080803@redhat.com> <83mwohn0nj.fsf@gnu.org> In-Reply-To: <83mwohn0nj.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00438.txt.bz2 On 08/16/2013 03:57 PM, Eli Zaretskii wrote: >> Date: Fri, 16 Aug 2013 15:21:50 +0100 >> From: Pedro Alves >> CC: yao@codesourcery.com, gdb-patches@sourceware.org, brobecker@adacore.com >> >> On 08/16/2013 03:03 PM, Eli Zaretskii wrote: >> >>> I suggest not to broaden the issue beyond the original problem, lest >>> we will be unable to solve it. >> >> Nobody's doing that. What I'm saying is that the testsuite is not >> special, and we should _zone in_ to the real problem, and fix it >> completely. > > A complete solution, if it exists, might require much more effort, I don't think it does. - First, make stderr always unbuffered. That's what you get on most platforms anyway. - Then, somewhere along fputs_unfiltered or some central output routine, keep track of which was the last to be used between stdout and stderr. If outputting to stderr, flush stdout first. Don't need to do the opposite, since stderr will always be unbuffered. -- Pedro Alves