Remove where.exe timeout (#970)

This commit is contained in:
Pavel Krymets 2018-06-25 15:14:59 -07:00 committed by GitHub
parent 2da2482671
commit 4a0691a36c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -497,13 +497,8 @@ HOSTFXR_UTILITY::InvokeWhereToFindDotnet()
hProcess = processInformation.hProcess;
hThread = processInformation.hThread;
// Wait for where.exe to return, waiting 2 seconds.
if (LOG_LAST_ERROR_IF(WaitForSingleObject(processInformation.hProcess, 2000) != WAIT_OBJECT_0))
{
// Timeout occured, terminate the where.exe process and return.
FINISHED_LAST_ERROR_IF(!TerminateProcess(processInformation.hProcess, 2));
FINISHED_IF_FAILED(HRESULT_FROM_WIN32(ERROR_TIMEOUT));
}
// Wait for where.exe to return
WaitForSingleObject(processInformation.hProcess, INFINITE);
//
// where.exe will return 0 on success, 1 if the file is not found