[Lldb-commits] [lldb] Avoid stalls when MainLoop::Interrupt fails to wake up the MainLoop (PR #164905)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 24 11:27:15 PDT 2025
================
@@ -387,10 +387,13 @@ void MainLoopPosix::ProcessSignal(int signo) {
}
}
-void MainLoopPosix::Interrupt() {
+bool MainLoopPosix::Interrupt() {
if (m_interrupting.exchange(true))
- return;
+ return true;
char c = '.';
- cantFail(m_interrupt_pipe.Write(&c, 1));
+ llvm::Expected<size_t> result = m_interrupt_pipe.Write(&c, 1);
+ if (result && *result != 0)
+ return true;
+ return false;
----------------
bulbazord wrote:
Minor Suggestion: `return result && *result != 0`
https://github.com/llvm/llvm-project/pull/164905
More information about the lldb-commits
mailing list