[Lldb-commits] [PATCH] D112442: [lldb] [Host/ConnectionFileDescriptor] Do not use non-blocking mode

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 25 07:24:19 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG9d63b90b59a6: [lldb] [Host/ConnectionFileDescriptor] Do not use non-blocking mode (authored by mgorny).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112442

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


Index: lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
===================================================================
--- lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
+++ lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
@@ -722,13 +722,6 @@
     llvm::sys::RetryAfterSignal(-1, ::tcsetattr, fd, TCSANOW, &options);
   }
 
-  int flags = ::fcntl(fd, F_GETFL, 0);
-  if (flags >= 0) {
-    if ((flags & O_NONBLOCK) == 0) {
-      flags |= O_NONBLOCK;
-      ::fcntl(fd, F_SETFL, flags);
-    }
-  }
   m_io_sp =
       std::make_shared<NativeFile>(fd, File::eOpenOptionReadWrite, true);
   return eConnectionStatusSuccess;
@@ -761,14 +754,6 @@
     return eConnectionStatusError;
   }
 
-  int flags = ::fcntl(fd, F_GETFL, 0);
-  if (flags >= 0) {
-    if ((flags & O_NONBLOCK) == 0) {
-      flags |= O_NONBLOCK;
-      ::fcntl(fd, F_SETFL, flags);
-    }
-  }
-
   llvm::Expected<std::unique_ptr<SerialPort>> serial_sp = SerialPort::Create(
       fd, File::eOpenOptionReadWrite, serial_options.get(), true);
   if (!serial_sp) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112442.381986.patch
Type: text/x-patch
Size: 1064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211025/8539d0c6/attachment.bin>


More information about the lldb-commits mailing list