in reply to [UPDATED] How to autoflush streams (i.e. open3 calls)

Have you tried using the same handle for both STDOUT and STDERR?

Alternatively, if you're using win32, there is an system api to control the buffer size (local and remote) of pipes. You may be able to reduce the buffer size to 0 and so achieve some level of immediacy.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re: [UPDATED] How to autoflush streams (i.e. open3 calls)