diff --git a/patches/kernel32-Console_Handles/0001-kernel32-Invalid-console-handles-for-new-processes-a.patch b/patches/kernel32-Console_Handles/0001-kernel32-Invalid-console-handles-for-new-processes-a.patch index a6b512b2..c26cd75e 100644 --- a/patches/kernel32-Console_Handles/0001-kernel32-Invalid-console-handles-for-new-processes-a.patch +++ b/patches/kernel32-Console_Handles/0001-kernel32-Invalid-console-handles-for-new-processes-a.patch @@ -1,14 +1,14 @@ -From 6dbc9cf8b80fa44d77b1017b6932251d6ff12fe7 Mon Sep 17 00:00:00 2001 +From 43d5b2c8aa48574bfdbbb3f76c6ad670f7627571 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sat, 3 Jan 2015 23:37:42 -0700 Subject: kernel32: Invalid console handles for new processes are 0, not INVALID_HANDLE_VALUE. --- - dlls/kernel32/console.c | 15 +++++++------ + dlls/kernel32/console.c | 15 ++++++------ dlls/kernel32/environ.c | 12 +++++----- - dlls/kernel32/tests/process.c | 52 ++++++++++++++++++++++++++++++++++++++++++- - 3 files changed, 65 insertions(+), 14 deletions(-) + dlls/kernel32/tests/process.c | 54 ++++++++++++++++++++++++++++++++++++++++++- + 3 files changed, 67 insertions(+), 14 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 303b638..14f1189 100644 @@ -78,7 +78,7 @@ index 57b6a1f..99bf706 100644 RtlReleasePebLock(); } diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c -index 218a0d3..e621689 100644 +index d7d3148..787ebfa 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -57,7 +57,7 @@ @@ -132,15 +132,16 @@ index 218a0d3..e621689 100644 /* since GetStartupInfoW is only implemented in win2k, * zero out before calling so we can notice the difference */ -@@ -2063,6 +2077,41 @@ static void test_DuplicateHandle(void) +@@ -2119,6 +2133,43 @@ static void test_DuplicateHandle(void) CloseHandle(out); } +void test_StartupNoConsole(void) +{ ++#ifndef _WIN64 + char buffer[MAX_PATH]; -+ PROCESS_INFORMATION info; -+ STARTUPINFOA startup; ++ STARTUPINFOA startup; ++ PROCESS_INFORMATION info; + DWORD code; + + if (!pNtCurrentTeb) @@ -160,21 +161,22 @@ index 218a0d3..e621689 100644 + ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n"); + ok(GetExitCodeProcess(info.hProcess, &code), "Getting exit code\n"); + WritePrivateProfileStringA(NULL, NULL, NULL, resfile); -+ okChildInt("StartupInfoA", "hStdInput", (DWORD_PTR)INVALID_HANDLE_VALUE); -+ okChildInt("StartupInfoA", "hStdOutput", (DWORD_PTR)INVALID_HANDLE_VALUE); -+ okChildInt("StartupInfoA", "hStdError", (DWORD_PTR)INVALID_HANDLE_VALUE); -+ okChildInt("TEB", "hStdInput", (DWORD_PTR)0); -+ okChildInt("TEB", "hStdOutput", (DWORD_PTR)0); -+ okChildInt("TEB", "hStdError", (DWORD_PTR)0); ++ okChildInt("StartupInfoA", "hStdInput", (UINT)INVALID_HANDLE_VALUE); ++ okChildInt("StartupInfoA", "hStdOutput", (UINT)INVALID_HANDLE_VALUE); ++ okChildInt("StartupInfoA", "hStdError", (UINT)INVALID_HANDLE_VALUE); ++ okChildInt("TEB", "hStdInput", 0); ++ okChildInt("TEB", "hStdOutput", 0); ++ okChildInt("TEB", "hStdError", 0); + release_memory(); + assert(DeleteFileA(resfile) != 0); ++#endif + +} + START_TEST(process) { BOOL b = init(); -@@ -2092,6 +2141,7 @@ START_TEST(process) +@@ -2149,6 +2200,7 @@ START_TEST(process) test_SystemInfo(); test_RegistryQuota(); test_DuplicateHandle();