summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-02-25 13:17:32 +0100
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-03-16 10:09:45 +0100
commit5460afe9a2d9f4c94190d92eea5b188e52c1c80f (patch)
treee55e189578fc5cc9cb97842e931c30c9e6819d44
parent33d6404a6527f1b1f0dc1d80e79c5c46c198c953 (diff)
fix exit code forwarding
In rare cases (failing blocking sub-make) the exit code is retrieved from the Process object. Unfortunately Process::exitCode() always returned 0, because the m_exitCode member wasn't set anywhere. Task-number: QTCREATORBUG-11556 Change-Id: I92ea93cd8e369a12096d6acb23c67bf803f62737 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--src/jomlib/process.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jomlib/process.cpp b/src/jomlib/process.cpp
index 8e15c1f..25f461c 100644
--- a/src/jomlib/process.cpp
+++ b/src/jomlib/process.cpp
@@ -433,13 +433,13 @@ void Process::onProcessFinished()
safelyCloseHandle(d->hProcessThread);
printBufferedOutput();
m_state = NotRunning;
- DWORD exitCode = d->exitCode;
+ m_exitCode = d->exitCode;
d->exitCode = STILL_ACTIVE;
//### for now we assume a crash if exit code is less than -1 or the magic number
- bool crashed = (exitCode == 0xf291 || (int)exitCode < 0);
+ const bool crashed = (m_exitCode == 0xf291 || m_exitCode < 0);
ExitStatus exitStatus = crashed ? Process::CrashExit : Process::NormalExit;
- emit finished(exitCode, exitStatus);
+ emit finished(m_exitCode, exitStatus);
}
bool Process::waitForFinished()