summaryrefslogtreecommitdiffstats
path: root/Source/cmWorkerPool.cxx
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-07-12 13:01:38 (GMT)
committerBrad King <brad.king@kitware.com>2023-07-12 14:29:49 (GMT)
commitbddd8f0e541cad179c20bccf8c9e016c0d2e534e (patch)
tree64b74c8bdb663b39fbcea7e62dd58090e71485fb /Source/cmWorkerPool.cxx
parentfbe5f49d63fe058277b41991cb025631093b25a2 (diff)
downloadCMake-bddd8f0e541cad179c20bccf8c9e016c0d2e534e.zip
CMake-bddd8f0e541cad179c20bccf8c9e016c0d2e534e.tar.gz
CMake-bddd8f0e541cad179c20bccf8c9e016c0d2e534e.tar.bz2
cmWorkerPool: Show process exit code / signal number upon failure
Previously if an AUTOGEN process like moc exited with a non-zero exit code, cmWorkerPool would not populate the result's ErrorMessage because it mistakenly thought that if the ExitCode / TermSignal had a non-zero value, the ErrorMessage must have already been set. This was a wrong assumption. Instead, check if ErrorMessage is empty, and if it is, set it to whatever the exit code or term signal number is.
Diffstat (limited to 'Source/cmWorkerPool.cxx')
-rw-r--r--Source/cmWorkerPool.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmWorkerPool.cxx b/Source/cmWorkerPool.cxx
index 1d15c27..27cdbba 100644
--- a/Source/cmWorkerPool.cxx
+++ b/Source/cmWorkerPool.cxx
@@ -309,7 +309,7 @@ void cmUVReadOnlyProcess::UVExit(uv_process_t* handle, int64_t exitStatus,
// Set error message on demand
proc.Result()->ExitStatus = exitStatus;
proc.Result()->TermSignal = termSignal;
- if (!proc.Result()->error()) {
+ if (proc.Result()->ErrorMessage.empty()) {
if (termSignal != 0) {
proc.Result()->ErrorMessage = cmStrCat(
"Process was terminated by signal ", proc.Result()->TermSignal);