[bf1942] Unbuffered output please

Richard Deken rdeken at jam.rr.com
Sun Feb 16 12:58:59 EST 2003


On Sat, 2003-02-15 at 08:05, Fritz Elfert wrote:
> Ryan,
> 
> Can you please make stdout/stderr unbuffered for the next release
> (iow: put setbuf(stdout, NULL); setbuf(stderr,NULL); at the start of main()).
> I'm trying to run some automated tests with redirecting the server's
> output to logfiles with tee. If it's unbuffered like now, there might
> be some debugging-output get lost when it crashes. I know, this probably
> is another performance-killer but unless it runs really stable ....
> 
> Thanks
>  -Fritz

Fritz,

I don't see any reason to go fully unbuffered.  Limiting to line
buffering should be sufficient.  (I'm sure Ryan already knows how to set the
buffering mode regardless of whether ANSI-C I/O functions, Unix streams, or C++ 
streams are used for I/O.)  Depending on how the code was written, fully 
unbuffered may cause an additional performance penalty beyond that of using 
line buffering.

								-Rad






More information about the Bf1942 mailing list