This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Unbuffer stdout and stderr on windows


> Date: Fri, 16 Aug 2013 12:46:17 +0100
> From: Pedro Alves <palves@redhat.com>
> 
> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]