Skip to content

Commit 937b7e6

Browse files
committed
Fixed testprocess on 32-bit Windows
Previously the test would kill the child process while it was in the process of initializing (loading DLLs, etc) and this would cause the test to fail.
1 parent f8bace9 commit 937b7e6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/testprocess.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,11 @@ static int SDLCALL process_testKill(void *arg)
367367
result = SDL_WaitProcess(process, false, &exit_code);
368368
SDLTest_AssertCheck(result == false, "Process should not have exited yet");
369369

370-
SDLTest_AssertPass("About to call SDL_KillProcess(false)");
371-
result = SDL_KillProcess(process, false);
370+
/* Wait for the child process to finish initializing */
371+
SDL_Delay(500);
372+
373+
SDLTest_AssertPass("About to call SDL_KillProcess(true)");
374+
result = SDL_KillProcess(process, true);
372375
SDLTest_AssertCheck(result == true, "Process should have exited");
373376

374377
exit_code = 0;

0 commit comments

Comments
 (0)