diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-06-02 20:02:23 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-06-08 18:56:27 (GMT) |
commit | 891b60d691812c45b92d4ad2127e1559f80f8332 (patch) | |
tree | 835fea3aab501b9a2d1f431093f58e6083a8c56f /Source/cmLDConfigLDConfigTool.cxx | |
parent | 5be0cd9f3c07b60b1f60ea678c1d82c38185ca27 (diff) | |
download | CMake-891b60d691812c45b92d4ad2127e1559f80f8332.zip CMake-891b60d691812c45b92d4ad2127e1559f80f8332.tar.gz CMake-891b60d691812c45b92d4ad2127e1559f80f8332.tar.bz2 |
cmUVProcessChain: Add Status::SpawnResult field
Diffstat (limited to 'Source/cmLDConfigLDConfigTool.cxx')
-rw-r--r-- | Source/cmLDConfigLDConfigTool.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmLDConfigLDConfigTool.cxx b/Source/cmLDConfigLDConfigTool.cxx index 0752b33..7ce1a59 100644 --- a/Source/cmLDConfigLDConfigTool.cxx +++ b/Source/cmLDConfigLDConfigTool.cxx @@ -43,7 +43,7 @@ bool cmLDConfigLDConfigTool::GetLDConfigPaths(std::vector<std::string>& paths) builder.SetBuiltinStream(cmUVProcessChainBuilder::Stream_OUTPUT) .AddCommand(ldConfigCommand); auto process = builder.Start(); - if (!process.Valid()) { + if (!process.Valid() || process.GetStatus(0).SpawnResult != 0) { this->Archive->SetError("Failed to start ldconfig process"); return false; } @@ -61,8 +61,7 @@ bool cmLDConfigLDConfigTool::GetLDConfigPaths(std::vector<std::string>& paths) this->Archive->SetError("Failed to wait on ldconfig process"); return false; } - auto status = process.GetStatus(); - if (!status[0] || status[0]->ExitStatus != 0) { + if (process.GetStatus(0).ExitStatus != 0) { this->Archive->SetError("Failed to run ldconfig"); return false; } |