mirror of
https://github.com/Kitware/CMake.git
synced 2026-07-08 23:57:29 +00:00
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.
This commit is contained in:
committed by
Brad King
parent
fbe5f49d63
commit
bddd8f0e54
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user