From 7b29c29d85016d07606eea590724f286d67dddad Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 29 Aug 2011 15:17:31 +0100 Subject: [PATCH] Avoid trying to wait for the main app process to exit if no process ID for it is specified --- src/UpdateInstaller.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/UpdateInstaller.cpp b/src/UpdateInstaller.cpp index 13a161d..cf4a516 100644 --- a/src/UpdateInstaller.cpp +++ b/src/UpdateInstaller.cpp @@ -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 args = updaterArgs(); args.push_back("--mode");