0
0
Fork 0
mirror of https://github.com/ZDoom/gzdoom-gles.git synced 2025-02-28 22:11:19 +00:00

- do not wait infinitely for termination of the Timidity++ process. This can lock up the engine indefinitely if the child process fails to exit.

This commit is contained in:
Christoph Oelckers 2015-11-27 12:12:08 +01:00
parent 7e87216878
commit a55d85c51c

View file

@ -713,11 +713,11 @@ BOOL SafeTerminateProcess(HANDLE hProcess, UINT uExitCode)
if ( hRT ) if ( hRT )
{ {
// Must wait process to terminate to guarantee that it has exited... // Must wait for process to terminate to guarantee that it has exited...
WaitForSingleObject(hProcess, INFINITE); DWORD res = WaitForSingleObject(hProcess, 1000);
CloseHandle(hRT); CloseHandle(hRT);
bSuccess = TRUE; bSuccess = (res == WAIT_OBJECT_0);
dwErr = WAIT_TIMEOUT;
} }
if ( !bSuccess ) if ( !bSuccess )