Replace new console handle patch with a version that does not inherit the handles from the parent.

This commit is contained in:
Erich E. Hoover 2015-01-04 09:33:16 -07:00
parent ef6a3db00f
commit 1ba1541771
2 changed files with 10 additions and 9 deletions

View File

@ -726,9 +726,9 @@ iphlpapi-TCP_Table.ok:
# |
.INTERMEDIATE: kernel32-Create_Handles_for_New_Consoles.ok
kernel32-Create_Handles_for_New_Consoles.ok:
$(call APPLY_FILE,kernel32-Create_Handles_for_New_Consoles/0001-kernel32-Allocate-console-handles-for-new-consoles-a.patch)
$(call APPLY_FILE,kernel32-Create_Handles_for_New_Consoles/0001-kernel32-Allocate-console-handles-when-creating-a-pr.patch)
@( \
echo '+ { "Erich E. Hoover", "kernel32: Allocate console handles for new consoles at long as the process is not detached.", 1 },'; \
echo '+ { "Erich E. Hoover", "kernel32: Allocate console handles when creating a process with a new console.", 1 },'; \
) > kernel32-Create_Handles_for_New_Consoles.ok
# Patchset kernel32-GetFinalPathNameByHandle

View File

@ -1,24 +1,25 @@
From d15f6c220c9892be869e50e4a5f52a1bbc2e5b60 Mon Sep 17 00:00:00 2001
From 5b221387c0df72462ba6603875cf6e2bf9a15fd9 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Sat, 3 Jan 2015 23:37:42 -0700
Subject: kernel32: Allocate console handles for new consoles at long as the
process is not detached.
Subject: kernel32: Allocate console handles when creating a process with a new
console.
---
dlls/kernel32/console.c | 3 ++-
dlls/kernel32/console.c | 4 +++-
dlls/kernel32/process.c | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 303b638..8243de2 100644
index 303b638..d08818a 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -3061,7 +3061,8 @@ DWORD WINAPI GetConsoleProcessList(LPDWORD processlist, DWORD processcount)
@@ -3061,7 +3061,9 @@ DWORD WINAPI GetConsoleProcessList(LPDWORD processlist, DWORD processcount)
BOOL CONSOLE_Init(RTL_USER_PROCESS_PARAMETERS *params)
{
memset(&S_termios, 0, sizeof(S_termios));
- if (params->ConsoleHandle == KERNEL32_CONSOLE_SHELL)
+ if (params->ConsoleHandle == KERNEL32_CONSOLE_SHELL ||
+ /* FIXME: probably not correct, needs more tests */
+ params->ConsoleHandle == KERNEL32_CONSOLE_ALLOC)
{
HANDLE conin;