[Lldb-commits] [lldb] [lldb] Don't exit the main loop when in runs out of things to listen on (PR #112565)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 17 07:32:37 PDT 2024


================
@@ -365,10 +365,7 @@ Status MainLoopPosix::Run() {
   Status error;
   RunImpl impl(*this);
 
-  // run until termination or until we run out of things to listen to
-  // (m_read_fds will always contain m_trigger_pipe fd, so check for > 1)
-  while (!m_terminate_request &&
----------------
labath wrote:

It's not about the pipe being empty or not, but rather about the (internal, used for interrupts) pipe FD being present in the list of FDs we are listening on. Since we want(ed) to exit when the last user/external FD went away, we needed to skip/ignore the internal pipe fd. Removing this is another reason why I like this patch :)

https://github.com/llvm/llvm-project/pull/112565


More information about the lldb-commits mailing list