[PATCH 0/1] MR2986: kernelbase: Allow AllocConsole() to proceed if the current console is...
I am not sure how to add a proper test in this case because we run tests in a console. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2986
From: Zhiyi Zhang <zzhang(a)codeweavers.com> CONSOLE_HANDLE_SHELL_NO_WINDOW is a pseudo console for initial CUI processes not tied to a Unix tty. Fix Scrap Mechanic not able to allocate a debug console when adding a -dev command line option, which is a regression from eff83cd. --- dlls/kernelbase/console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c index cd5fdb7d9f7..13a1f8fbe31 100644 --- a/dlls/kernelbase/console.c +++ b/dlls/kernelbase/console.c @@ -405,7 +405,8 @@ static BOOL alloc_console( BOOL headless ) RtlEnterCriticalSection( &console_section ); - if (RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle) + if (RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle + && RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle != CONSOLE_HANDLE_SHELL_NO_WINDOW) { /* we already have a console opened on this process, don't create a new one */ RtlLeaveCriticalSection( &console_section ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2986
This merge request was closed by Zhiyi Zhang. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2986
<epouech> not sure I fully agree with your last MR... IMO is issue is more that the program is created under windows by a gui app, and likely not attached to any console (in CreateProcess)
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2986#note_34779
participants (2)
-
Zhiyi Zhang -
Zhiyi Zhang (@zhiyi)