Standard output does not get flushed in cygwin?

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 2 07:51:51 PST 2017


On Monday, 2 January 2017 at 15:38:20 UTC, Anonymouse wrote:
> Maybe I'll just have to paste version (Windows) stdout.flush() 
> everywhere. Or maybe I can hijack calls to my own writeln 
> wrapper.

It comes from the C library thinking those other consoles are 
pipes instead of consoles, and thus block buffering instead of 
line buffering.

Easy fix is to just flush after each line... actually, IMO, the 
top-level writeln should just always do this since it is one of 
the most common FAQs.


More information about the Digitalmars-d-learn mailing list