Avoid trying to wait for the main app process to exit if no process ID for it is specified

This commit is contained in:
Robert Knight 2011-08-29 15:17:31 +01:00
parent f9238f479b
commit 7b29c29d85

View file

@ -89,8 +89,11 @@ void UpdateInstaller::run() throw ()
if (m_mode == Setup)
{
LOG(Info,"Waiting for main app process to finish");
ProcessUtils::waitForProcess(m_waitPid);
if (m_waitPid != 0)
{
LOG(Info,"Waiting for main app process to finish");
ProcessUtils::waitForProcess(m_waitPid);
}
std::list<std::string> args = updaterArgs();
args.push_back("--mode");