зеркало из https://github.com/mozilla/pjs.git
Bug 470946 - PostUpdateWin WinPostProcess should launch synchronously. r=rstrong
This commit is contained in:
Родитель
d1f7b43e39
Коммит
b6a7c60ef4
|
@ -1069,6 +1069,8 @@ LaunchWinPostProcess(const WCHAR *appExe)
|
|||
|
||||
WCHAR exefile[MAXPATHLEN];
|
||||
WCHAR exearg[MAXPATHLEN];
|
||||
WCHAR exeasync[10];
|
||||
PRBool async = PR_TRUE;
|
||||
|
||||
if (!GetPrivateProfileStringW(L"PostUpdateWin", L"ExeRelPath", NULL, exefile,
|
||||
MAXPATHLEN, inifile))
|
||||
|
@ -1078,6 +1080,10 @@ LaunchWinPostProcess(const WCHAR *appExe)
|
|||
MAXPATHLEN, inifile))
|
||||
return;
|
||||
|
||||
if (!GetPrivateProfileStringW(L"PostUpdateWin", L"ExeAsync", L"TRUE", exeasync,
|
||||
sizeof(exeasync)/sizeof(exeasync[0]), inifile))
|
||||
return;
|
||||
|
||||
WCHAR exefullpath[MAXPATHLEN];
|
||||
wcscpy(exefullpath, appExe);
|
||||
|
||||
|
@ -1104,6 +1110,9 @@ LaunchWinPostProcess(const WCHAR *appExe)
|
|||
wcscpy(cmdline, dummyArg);
|
||||
wcscat(cmdline, exearg);
|
||||
|
||||
if (!_wcsnicmp(exeasync, L"false", 6) || !_wcsnicmp(exeasync, L"0", 2))
|
||||
async = PR_FALSE;
|
||||
|
||||
// We want to launch the post update helper app to update the Windows
|
||||
// registry even if there is a failure with removing the uninstall.update
|
||||
// file or copying the update.log file.
|
||||
|
@ -1126,6 +1135,9 @@ LaunchWinPostProcess(const WCHAR *appExe)
|
|||
free(cmdline);
|
||||
|
||||
if (ok) {
|
||||
if (!async)
|
||||
WaitForSingleObject(pi.hProcess, INFINITE);
|
||||
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче