[Lldb-commits] [PATCH] D144240: Clear read_fd_set if EINTR received

Emre Kultursay via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 16 23:10:45 PST 2023


emrekultursay updated this revision to Diff 498257.
emrekultursay added a comment.
Herald added a subscriber: JDevlieghere.

Fix indentation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144240/new/

https://reviews.llvm.org/D144240

Files:
  lldb/source/Host/posix/MainLoopPosix.cpp


Index: lldb/source/Host/posix/MainLoopPosix.cpp
===================================================================
--- lldb/source/Host/posix/MainLoopPosix.cpp
+++ lldb/source/Host/posix/MainLoopPosix.cpp
@@ -156,9 +156,12 @@
     size_t sigset_len;
   } extra_data = {&kernel_sigset, sizeof(kernel_sigset)};
   if (syscall(__NR_pselect6, nfds, &read_fd_set, nullptr, nullptr, nullptr,
-              &extra_data) == -1 &&
-      errno != EINTR)
-    return Status(errno, eErrorTypePOSIX);
+              &extra_data) == -1) {
+    if (errno != EINTR)
+      return Status(errno, eErrorTypePOSIX);
+    else
+      FD_ZERO(&read_fd_set);
+  }
 
   return Status();
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144240.498257.patch
Type: text/x-patch
Size: 669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230217/8dc76b2b/attachment.bin>


More information about the lldb-commits mailing list