Piotr Caban : msvcrt: Don' t close handles returned by GetStdHandle function.

Alexandre Julliard julliard at winehq.org
Tue Jan 28 13:33:24 CST 2014


Module: wine
Branch: master
Commit: 5e3cadf8342e2f008ca084188be94b4ab1f1f394
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5e3cadf8342e2f008ca084188be94b4ab1f1f394

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue Jan 28 10:08:47 2014 +0100

msvcrt: Don't close handles returned by GetStdHandle function.

---

 dlls/msvcrt/file.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index a78076c..80482e1 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -1066,14 +1066,8 @@ void msvcrt_free_io(void)
     unsigned int i;
     int j;
 
+    MSVCRT__flushall();
     MSVCRT__fcloseall();
-    /* 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]);
 
     for(i=0; i<sizeof(MSVCRT___pioinfo)/sizeof(MSVCRT___pioinfo[0]); i++)
         MSVCRT_free(MSVCRT___pioinfo[i]);




More information about the wine-cvs mailing list