From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16427 invoked by alias); 15 Aug 2013 17:44:45 -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 16412 invoked by uid 89); 15 Aug 2013 17:44:44 -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 X-Spam-User: qpsmtpd, 2 recipients Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 15 Aug 2013 17:44:43 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MRL007002F1L600@a-mtaout20.012.net.il>; Thu, 15 Aug 2013 20:44:14 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MRL007362LNFE50@a-mtaout20.012.net.il>; Thu, 15 Aug 2013 20:44:12 +0300 (IDT) Date: Thu, 15 Aug 2013 17:44:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Unbuffer stdout and stderr on windows In-reply-to: <20130815173618.GA6955@ednor.casa.cgf.cx> To: Christopher Faylor Cc: palves@redhat.com, gdb-patches@sourceware.org, yao@codesourcery.com, brobecker@adacore.com Reply-to: Eli Zaretskii Message-id: <83eh9uonlg.fsf@gnu.org> References: <1374462417-7961-1-git-send-email-yao@codesourcery.com> <838v0yy556.fsf@gnu.org> <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> X-SW-Source: 2013-08/txt/msg00403.txt.bz2 > Date: Thu, 15 Aug 2013 13:36:18 -0400 > From: Christopher Faylor > > I thought that "unbuffered" normally means something like "every output > operation gets immediately sent as a block" rather than "flush > after every character". AFAIK, unbuffered always meant the latter. > If the mingw "unbuffered" mode means that everything is o n e c h a > r a c t e r a t a t i m e It does mean that. Doesn't it work like that in Cygwin? > maybe this is just the way emacs itself works. Emacs sits in a pselect call waiting for input, when input is available, it reads it. If input is available one character at a time, it will be read in very small chunks. > The other alternative would be to use line buffering for gdb. I don't > see why cygwin pipes (whether they are "ptys" or actual pipes) are a > special case here. stdout is usually line buffered isn't it? Why not > just force that behavior for gdb? That's what I suggested, but Yao says that using line buffering still fails some tests.