Eric Pouech : msvcrt: IO init.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 11 07:43:10 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 819565be210843c51934e89a7d8e82b87b044220
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=819565be210843c51934e89a7d8e82b87b044220

Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date:   Sat Apr  8 11:59:14 2006 +0200

msvcrt: IO init.

Make sure, when copying handles from std ones (when no io info is
inherited from parent) to create inheritable handles (spotted by
qingdao daoo).

---

 dlls/msvcrt/file.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 0a99cce..5a02a29 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -346,21 +346,21 @@ void msvcrt_init_io(void)
   if (!(MSVCRT_fdesc[0].wxflag & WX_OPEN) || MSVCRT_fdesc[0].handle == INVALID_HANDLE_VALUE)
   {
     DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_INPUT_HANDLE),
-                    GetCurrentProcess(), &MSVCRT_fdesc[0].handle, 0, FALSE, 
+                    GetCurrentProcess(), &MSVCRT_fdesc[0].handle, 0, TRUE, 
                     DUPLICATE_SAME_ACCESS);
     MSVCRT_fdesc[0].wxflag = WX_OPEN | WX_TEXT;
   }
   if (!(MSVCRT_fdesc[1].wxflag & WX_OPEN) || MSVCRT_fdesc[1].handle == INVALID_HANDLE_VALUE)
   {
     DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_OUTPUT_HANDLE),
-                    GetCurrentProcess(), &MSVCRT_fdesc[1].handle, 0, FALSE, 
+                    GetCurrentProcess(), &MSVCRT_fdesc[1].handle, 0, TRUE, 
                     DUPLICATE_SAME_ACCESS);
     MSVCRT_fdesc[1].wxflag = WX_OPEN | WX_TEXT;
   }
   if (!(MSVCRT_fdesc[2].wxflag & WX_OPEN) || MSVCRT_fdesc[2].handle == INVALID_HANDLE_VALUE)
   {
     DuplicateHandle(GetCurrentProcess(), GetStdHandle(STD_ERROR_HANDLE),
-                    GetCurrentProcess(), &MSVCRT_fdesc[2].handle, 0, FALSE, 
+                    GetCurrentProcess(), &MSVCRT_fdesc[2].handle, 0, TRUE, 
                     DUPLICATE_SAME_ACCESS);
     MSVCRT_fdesc[2].wxflag = WX_OPEN | WX_TEXT;
   }




More information about the wine-cvs mailing list