[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 13 12:53:45 PST 2024
================
@@ -0,0 +1,45 @@
+#include <iostream>
+#include <thread>
+#include <unistd.h>
+#include <vector>
+
----------------
clayborg wrote:
Might be a good idea to create a global `std::vector<pid_t>` and a mutex to protect it. And any child processes that get forked get added to this vector. So maybe add:
```
std::mutex g_child_pids_mutex;
std::vector<pid_t> g_child_pids;
```
I will comment below where to use it.
https://github.com/llvm/llvm-project/pull/81564
More information about the lldb-commits
mailing list