Piotr Caban (@piotr) commented about dlls/msvcrt/file.c:
int j; _flushall();
- /* Make sure stdio is still usable during shutdown. */
- if (RtlDllShutdownInProgress())
Instead of calling `RtlDllShutdownInProgress` function please call `msvcrt_free_io` with additional parameter (`msvcrt_free_io(lpvReserved != NULL)`).