This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Unbuffer stdout and stderr on windows
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Christopher Faylor <cgf-use-the-mailinglist-please at sourceware dot org>
- Cc: palves at redhat dot com, gdb-patches at sourceware dot org, yao at codesourcery dot com, brobecker at adacore dot com
- Date: Thu, 15 Aug 2013 20:44:43 +0300
- Subject: Re: [PATCH] Unbuffer stdout and stderr on windows
- References: <1374462417-7961-1-git-send-email-yao at codesourcery dot com> <838v0yy556 dot fsf at gnu dot org> <51EE23F8 dot 1070905 at codesourcery dot com> <83wqohw4ee dot fsf at gnu dot org> <20130729192559 dot GA5348 at ednor dot casa dot cgf dot cx> <83d2q1xiyv dot fsf at gnu dot org> <51F6C7B2 dot 3020400 at redhat dot com> <20130731034045 dot GA5565 at ednor dot casa dot cgf dot cx> <20130812211105 dot GA11128 at adacore dot com> <8361v9piop dot fsf at gnu dot org> <20130815173618 dot GA6955 at ednor dot casa dot cgf dot cx>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Thu, 15 Aug 2013 13:36:18 -0400
> From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
>
> 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.