win64 DLL stdout printing after main process completes

Mike Parker aldacron at gmail.com
Tue Apr 27 00:08:00 UTC 2021


On Monday, 26 April 2021 at 14:44:53 UTC, cc wrote:

>
> The buffering also happens under cygwin shells (I'm not 
> building with cygwin, I just like using their bash shell).  If 
> I run a D program through the basic cmd.exe, it runs with no 
> stdout buffering.  However any other situation (shell, sublime 
> build+output capture, etc) buffering somehow gets enabled, 
> unless I explicitly disable it in code or wrap the write* 
> functions with stdout.flush() wrappers.  This has happened for 
> me for many versions of the dmd compiler stretching back years, 
> building both 32-bit and 64-bit executables.

So that's the difference, then. I ran my test through cmd.exe. 
Have you tried running a similar C setup through those other 
shells?




More information about the Digitalmars-d-learn mailing list