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 2/3] Unbuffer stdout and stderr in cygwin


> From: Yao Qi <yao@codesourcery.com>
> Date: Mon, 29 Jul 2013 16:45:45 +0800
> 
> +#ifdef __MINGW32__
> +  if (is_in_cygwin_p ())

I would suggest to call the function using_cygwin_pty or some such.
"is_in_cygwin" is IMO too ambiguous.

> +      setvbuf (stdout, NULL, _IONBF, BUFSIZ);
> +      setvbuf (stderr, NULL, _IONBF, BUFSIZ);

How about using line buffering instead on both streams?  Or at least
leave stdout line-buffered?  Did you try that, and if so, did that
have the same problems that triggered these patches?

You see, the way your patch works, using GDB from a Cygwin shell
window will always do the above, even when not running the test
suite.  Users might be unhappy that their standard output suddenly
becomes much less efficient.


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