Tango I/O bug?

Jason House jason.james.house at gmail.com
Tue Sep 18 14:02:12 PDT 2007


Given that enabling a flush doesn't solve the problem, what is the path forward for figuring out how to fix this?  It works on all other systems tested with dmd, but doesn't work on mac (with gdc).  (I've had big problems getting gdc and tango to play nicely with each other in a cygwin environment, but that's probably another thread)

Jason House Wrote:

> Sadly, this simple fix isn't the solution.  Here's what I got back (via e-mail)...
> 
> > This part is likely your problem: "It does real time communication in
> > plain text with a 3rd party controlling application"
> > That probably means the output is redirected and not sent to an actual
> > console, right?
> > The default behavior for Stdout is to auto-flush only if the output is
> > sent to an actual console (i.e. isn't redirected).
> 
> Well, it is sent to an actual console. I mean I just start housebot
> by hand
> and interact with it.
> 
> > To make sure flushing occurs, execute "Stdout.flush = true;" somewhere
> > at the start of your program (main(), a static this(), or just right
> > before the first output).
> 
> I tried that. I added the import for tango.io.Stdout to housebot.d
> and added
> "Stdout.flush = true;" at the beginning of main(), just after the
> variable
> declarations. But nothing changed.



More information about the Digitalmars-d-learn mailing list