[Lldb-commits] [lldb] [lldb] Handle signals in a separate thread in the driver (PR #134956)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 9 01:40:53 PDT 2025
================
@@ -794,6 +800,10 @@ int main(int argc, char const *argv[]) {
signal(SIGTSTP, sigtstp_handler);
#endif
+ // Run the signal handling MainLoop on a separate thread.
+ std::thread signal_thread([] { g_signal_loop.Run(); });
+ signal_thread.detach();
----------------
labath wrote:
I'd like to avoid a detached thread running around causing havoc during process destruction. Why not just join the thread right after the RequestTermination call?
https://github.com/llvm/llvm-project/pull/134956
More information about the lldb-commits
mailing list