[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
Thu Apr 10 23:20:49 PDT 2025
labath wrote:
I kinda like signalfd(2), although the implementation makes it kinda hard to use in environments you don't fully control. For one, it requires that the signal you're listening to is blocked on *all* threads in the process. If any thread unblocks it for any reason, you will miss the signal. And of course, it's linux extension, so we'd still need a fallback for other operating systems. The current MainLoop implementation is basically that -- the signal handler writes to the pipe to wake up the reading thread (it just write a single byte, not the actual `siginfo` structure, though we could change that if it was necessary).
https://github.com/llvm/llvm-project/pull/134956
More information about the lldb-commits
mailing list