Commit 894c1364 authored by 's avatar Committed by Alexandre Julliard

Flush output buffers from _close() rather than MSVCRT_fclose().

parent fd62fcf0
......@@ -773,9 +773,13 @@ int MSVCRT__fcloseall(void)
void msvcrt_free_io(void)
{
MSVCRT__fcloseall();
_close(0);
_close(1);
_close(2);
/* The Win32 _fcloseall() function explicitly doesn't close stdin,
* stdout, and stderr (unlike GNU), so we need to fclose() them here
* or they won't get flushed.
*/
MSVCRT_fclose(&MSVCRT__iob[0]);
MSVCRT_fclose(&MSVCRT__iob[1]);
MSVCRT_fclose(&MSVCRT__iob[2]);
DeleteCriticalSection(&MSVCRT_file_cs);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment