From e3a057c2bcdb7123ad790961f293162065c0b2b5 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 12 Jan 2009 19:26:30 +0300 Subject: [PATCH] restarter fixes --- bin/restarter.exe | Bin 7680 -> 7680 bytes tools/restarter/restarter.cpp | 10 ++++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/restarter.exe b/bin/restarter.exe index 013a915326257daa8ee66fdafbc15c82752b0368..36847872138e0f84ff2bddbff701c594b7d4074a 100644 GIT binary patch delta 120 zcmZp$X|S2_f=Mxd;wwMqyi|tG){LK+90aodhy532QE*@YQXD|4+n=M?og*Odzvu=a zulWc^d|dO7|E1#pMOT1i1%fg-6df4;i>`slZq8*X=K>l!`5E6iR%QkUhUCpV`6GE) PBMcG@(l(3BykrCb__-)% delta 120 zcmZp$X|S2_f=Nts;wwL9GiJuk){LK+9Bi}xhy532QE*@YQXD|4JDj7}pC>Trzvu=a zulWc^^N;_f;{QcgfaDkgGB^|+82*c{fyl+jZO&yW=K>l!`5E6iRz?N}2ItK?`6GE) P!wljKQZ|drykrCbp3WyU 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);