Commit 3b7baae6 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

kernelbase: Correctly handle new process group flag in CreateProcess.

(when CREATE_NEW_CONSOLE is used). Signed-off-by: 's avatarEric Pouech <epouech@codeweavers.com>
parent 38906e8f
......@@ -5080,8 +5080,8 @@ static void test_CreateProcessCUI(void)
/* 15 */ {FALSE, CREATE_NEW_PROCESS_GROUP, STARTUPINFO_STD, FALSE, CP_GROUP_LEADER, .is_todo = TRUE},
{TRUE, CREATE_NEW_PROCESS_GROUP | CREATE_NEW_CONSOLE, CONSOLE_STD, TRUE, CP_INH_CONSOLE | CP_WITH_WINDOW | CP_GROUP_LEADER | CP_ALONE},
{FALSE, CREATE_NEW_PROCESS_GROUP | CREATE_NEW_CONSOLE, CONSOLE_STD, TRUE, CP_GROUP_LEADER},
{TRUE, CREATE_NEW_PROCESS_GROUP | CREATE_NEW_CONSOLE, CONSOLE_STD, FALSE, CP_INH_CONSOLE | CP_WITH_WINDOW | CP_GROUP_LEADER | CP_ALONE | CP_ENABLED_CTRLC, .is_todo = TRUE},
{FALSE, CREATE_NEW_PROCESS_GROUP | CREATE_NEW_CONSOLE, CONSOLE_STD, FALSE, CP_GROUP_LEADER | CP_ENABLED_CTRLC, .is_todo = TRUE},
{TRUE, CREATE_NEW_PROCESS_GROUP | CREATE_NEW_CONSOLE, CONSOLE_STD, FALSE, CP_INH_CONSOLE | CP_WITH_WINDOW | CP_GROUP_LEADER | CP_ALONE | CP_ENABLED_CTRLC},
{FALSE, CREATE_NEW_PROCESS_GROUP | CREATE_NEW_CONSOLE, CONSOLE_STD, FALSE, CP_GROUP_LEADER | CP_ENABLED_CTRLC},
/* 20 */ {TRUE, CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS, CONSOLE_STD, TRUE, CP_GROUP_LEADER},
{FALSE, CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS, CONSOLE_STD, TRUE, CP_GROUP_LEADER},
{TRUE, CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS, CONSOLE_STD, FALSE, CP_GROUP_LEADER},
......
......@@ -187,10 +187,10 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
}
RtlFreeUnicodeString( &newdirW );
if (flags & CREATE_NEW_PROCESS_GROUP)
params->ConsoleFlags = 1;
else
if (!(flags & CREATE_NEW_PROCESS_GROUP))
params->ProcessGroupId = NtCurrentTeb()->Peb->ProcessParameters->ProcessGroupId;
else if (!(flags & CREATE_NEW_CONSOLE))
params->ConsoleFlags = 1;
if (flags & CREATE_NEW_CONSOLE) params->ConsoleHandle = CONSOLE_HANDLE_ALLOC;
else if (!(flags & DETACHED_PROCESS))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment