#3022: fix for WinCE

This commit is contained in:
Günter Obiltschnig 2021-06-14 17:29:52 +02:00
parent 842f2599c0
commit ee1ad75c2b

View File

@ -211,10 +211,19 @@ bool ProcessImpl::isRunningImpl(PIDImpl pid)
{
HANDLE hProc = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
bool result = true;
DWORD exitCode;
BOOL rc = GetExitCodeProcess(hProc, &exitCode);
if (!rc || exitCode != STILL_ACTIVE) result = false;
return result;}
if (hProc)
{
DWORD exitCode;
BOOL rc = GetExitCodeProcess(hProc, &exitCode);
if (!rc || exitCode != STILL_ACTIVE) result = false;
CloseHandle(hProc);
}
else
{
result = false;
}
return result;
}
void ProcessImpl::requestTerminationImpl(PIDImpl pid)