diff --git a/bin/restarter.exe b/bin/restarter.exe index 013a91532625..36847872138e 100644 Binary files a/bin/restarter.exe and b/bin/restarter.exe differ diff --git a/tools/restarter/restarter.cpp b/tools/restarter/restarter.cpp index 81c4a6a2568b..da1682182475 100644 --- a/tools/restarter/restarter.cpp +++ b/tools/restarter/restarter.cpp @@ -9,11 +9,13 @@ int _tmain(int argc, _TCHAR* argv[]) if (argc < 3) return 0; int ppid = _ttoi(argv [1]); HANDLE parent_process = OpenProcess(SYNCHRONIZE, FALSE, ppid); - if (!parent_process) return 0; - WaitForSingleObject(parent_process, INFINITE); - CloseHandle(parent_process); + if (parent_process) + { + WaitForSingleObject(parent_process, INFINITE); + CloseHandle(parent_process); + } - int rc = _texecv(argv [2], argv+3); + int rc = _texecv(argv [2], argv+2); if (rc == -1) { _tprintf(_T("Error restarting process: errno is %d"), errno);