- 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 )
{
// Must wait process to terminate to guarantee that it has exited...
WaitForSingleObject(hProcess, INFINITE);
// Must wait for process to terminate to guarantee that it has exited...
DWORD res = WaitForSingleObject(hProcess, 1000);
CloseHandle(hRT);
bSuccess = TRUE;
bSuccess = (res == WAIT_OBJECT_0);
dwErr = WAIT_TIMEOUT;
}
if ( !bSuccess )