[Lldb-commits] [PATCH] D59606: [lldb] Add missing EINTR handling

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 21 01:43:58 PDT 2019


labath added inline comments.


================
Comment at: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp:255-258
+        llvm::sys::RetryAfterSignal(-1, ::cfsetospeed,
+            &options, B115200);
+        llvm::sys::RetryAfterSignal(-1, ::cfsetispeed,
+            &options, B115200);
----------------
mgorny wrote:
> labath wrote:
> > IIUC, these only manipulate the `options` struct, so I don't see how they could fail with EINTR. OTOH, the `tcsetattr` call below is documented to return EINTR at least on NetBSD <http://netbsd.gw.com/cgi-bin/man-cgi?cfsetospeed+3+NetBSD-current>.
> Yeah, that's why I covered it, though it looks surprising to me as well. But looking at the code, it can't happen really, so I'll just revert this.
I think we misunderstood each other. My expectation would be that these two calls don't need EINTR protection, but the tcsetattr call (line 267) does.


================
Comment at: lldb/tools/lldb-server/lldb-platform.cpp:22
 
+#include "llvm/Support/Errno.h"
 #include "llvm/Support/FileSystem.h"
----------------
revert this part too?


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

https://reviews.llvm.org/D59606





More information about the lldb-commits mailing list