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


On 08/16/2013 03:57 PM, Eli Zaretskii wrote:
>> Date: Fri, 16 Aug 2013 15:21:50 +0100
>> From: Pedro Alves <palves@redhat.com>
>> CC: yao@codesourcery.com, gdb-patches@sourceware.org, brobecker@adacore.com
>>
>> On 08/16/2013 03:03 PM, Eli Zaretskii wrote:
>>
>>> I suggest not to broaden the issue beyond the original problem, lest
>>> we will be unable to solve it.
>>
>> Nobody's doing that.  What I'm saying is that the testsuite is not
>> special, and we should _zone in_ to the real problem, and fix it
>> completely.
> 
> A complete solution, if it exists, might require much more effort,

I don't think it does.

- First, make stderr always unbuffered.  That's what you get on
most platforms anyway.
- Then, somewhere along fputs_unfiltered or some central output routine,
keep track of which was the last to be used between stdout and stderr.
If outputting to stderr, flush stdout first.  Don't need to do the
opposite, since stderr will always be unbuffered.

-- 
Pedro Alves


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