Commit 1d8ee100 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

kernel32/test: Simplify a couple of calls to 'process exit'.

parent 995b44fe
...@@ -2831,9 +2831,7 @@ static HANDLE test_AddSelfToJob(void) ...@@ -2831,9 +2831,7 @@ static HANDLE test_AddSelfToJob(void)
static void test_jobInheritance(HANDLE job) static void test_jobInheritance(HANDLE job)
{ {
char buffer[MAX_PATH + 23];
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
STARTUPINFOA si = {0};
DWORD dwret; DWORD dwret;
BOOL ret, out; BOOL ret, out;
...@@ -2843,10 +2841,7 @@ static void test_jobInheritance(HANDLE job) ...@@ -2843,10 +2841,7 @@ static void test_jobInheritance(HANDLE job)
return; return;
} }
sprintf(buffer, "\"%s\" process %s", selfname, "exit"); create_process("exit", &pi);
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
ok(ret, "CreateProcessA error %u\n", GetLastError());
out = FALSE; out = FALSE;
ret = pIsProcessInJob(pi.hProcess, job, &out); ret = pIsProcessInJob(pi.hProcess, job, &out);
...@@ -2875,8 +2870,7 @@ static void test_BreakawayOk(HANDLE job) ...@@ -2875,8 +2870,7 @@ static void test_BreakawayOk(HANDLE job)
return; return;
} }
sprintf(buffer, "\"%s\" process %s", selfname, "exit"); sprintf(buffer, "\"%s\" process exit", selfname);
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi);
ok(!ret, "CreateProcessA expected failure\n"); ok(!ret, "CreateProcessA expected failure\n");
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError()); expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
......
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