[Courses] Re: [C] A clarification on fflush(stderr)

Laurel Fan laurel at sdf.lonestar.org
Thu Aug 8 14:10:08 EST 2002


On Thu, Aug 08, 2002 at 01:57:10PM -0700, Akkana wrote:
> The reason a newline flushes the output buffer on stdout and stderr
> (at least on most systems) is that those those streams are line
> buffered.

That's strange.  stderr on my system is unbuffered, unless there's
something wrong with this code:

#include <stdio.h>

int main()
{
   fprintf(stderr, "stderr is unbuffered");
   sleep(60);
}



-- 
laurel at sdf.lonestar.org
http://dreadnought.gorgorg.org



More information about the Courses mailing list