[Lldb-commits] [lldb] [lldb] Fix race in macOS's FindProcessesImpl (PR #204109)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 16 08:04:02 PDT 2026
================
@@ -684,34 +685,59 @@ static bool GetMacOSXProcessUserAndGroup(ProcessInstanceInfo &process_info) {
return false;
}
-uint32_t Host::FindProcessesImpl(const ProcessInstanceInfoMatch &match_info,
- ProcessInstanceInfoList &process_infos) {
- std::vector<struct kinfo_proc> kinfos;
-
+/// Fetches the list of all processes. Returns true on success.
+[[nodiscard]] static bool
----------------
JDevlieghere wrote:
Why not have this return an `llvm::Error` to distinguish between `errno != ENOMEM` and running out of attempts? Then you can log something more meaningful in the caller than just "it failed".
https://github.com/llvm/llvm-project/pull/204109
More information about the lldb-commits
mailing list