I am not sure how to add a proper test in this case because we run tests in a console.
From: Zhiyi Zhang zzhang@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 );
This merge request was closed by Zhiyi Zhang.
<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)