From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8442 invoked by alias); 16 Aug 2013 13:17:35 -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 8432 invoked by uid 89); 16 Aug 2013 13:17:34 -0000 X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL autolearn=no version=3.3.2 Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 16 Aug 2013 13:17:33 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MRM00700KPAA200@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Fri, 16 Aug 2013 16:17:10 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MRM006CCKWMZ460@a-mtaout22.012.net.il>; Fri, 16 Aug 2013 16:17:10 +0300 (IDT) Date: Fri, 16 Aug 2013 13:17:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Unbuffer stdout and stderr on windows In-reply-to: <520E1109.7000304@redhat.com> To: Pedro Alves Cc: gdb-patches@sourceware.org, brobecker@adacore.com, yao@codesourcery.com Reply-to: Eli Zaretskii Message-id: <83y581n5ag.fsf@gnu.org> 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> X-SW-Source: 2013-08/txt/msg00424.txt.bz2 > Date: Fri, 16 Aug 2013 12:46:17 +0100 > From: Pedro Alves > > IMO, stderr should _always_ be forced to unbuffered. We are in agreement about stderr. The issue is with stdout. > I can't really imagine that leaving stdout fully buffered to > ever be good (which the cygwin detection seems to want to preserve), > even for frontends, given GDB is an interactive program, and even > MI is text/line based. If the choice is between fully buffered stdout and unbuffered stdout, I prefer the former for performance reasons. > So I think the "in cygwin" detection is really not necessary > or desirable, and this patch should go back to its original form: > > +#ifdef _WIN32 > + /* A Cygwin ssh session may not look like a terminal to the Windows > + runtime; ensure unbuffered output. */ > + setvbuf (stdout, NULL, _IONBF, BUFSIZ); > + setvbuf (stderr, NULL, _IONBF, BUFSIZ); > +#endif Sorry, I disagree. No one has ever complained about the current buffering of stdout on Windows. The issue that is the subject of this thread is a problem that happens in running the test suite. I firmly believe in the principle of not fixing that which isn't broken.