diff --git a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp --- a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp +++ b/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(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> serial_sp = SerialPort::Create( fd, File::eOpenOptionReadWrite, serial_options.get(), true); if (!serial_sp) {