diff options
author | Greg Clayton <gclayton@apple.com> | 2010-11-20 00:17:57 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-11-20 00:17:57 +0000 |
commit | cd55b1957eb9a6036e24cd841092e2102e75b53d (patch) | |
tree | d21c4f391eab469ba0349b49ac70df0299f3adaa /lldb/source/Core/ConnectionFileDescriptor.cpp | |
parent | 06a3f30be9721537115b983496b41f9fc11e5d5a (diff) | |
download | bcm5719-llvm-cd55b1957eb9a6036e24cd841092e2102e75b53d.tar.gz bcm5719-llvm-cd55b1957eb9a6036e24cd841092e2102e75b53d.zip |
Revert the End of file stuff that was added as it was causing read threads
to hang around and take a ton of CPU time. Caroline will fix this when she
gets back from vacation.
llvm-svn: 119877
Diffstat (limited to 'lldb/source/Core/ConnectionFileDescriptor.cpp')
-rw-r--r-- | lldb/source/Core/ConnectionFileDescriptor.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lldb/source/Core/ConnectionFileDescriptor.cpp b/lldb/source/Core/ConnectionFileDescriptor.cpp index bdf550e5953..96d70bc1012 100644 --- a/lldb/source/Core/ConnectionFileDescriptor.cpp +++ b/lldb/source/Core/ConnectionFileDescriptor.cpp @@ -156,18 +156,8 @@ ConnectionFileDescriptor::Read (void *dst, size_t dst_len, ConnectionStatus &sta ssize_t bytes_read = ::read (m_fd, dst, dst_len); if (bytes_read == 0) { - // 'read' did not return an error, but it didn't return any bytes either ==> End-of-File. - // If the file descriptor is still valid, then we don't return an error; otherwise we do. - // This allows whoever called us to act on the end-of-file, with a valid file descriptor, if they wish. - if (fcntl (m_fd, F_GETFL, 0) >= 0) - { - error.Clear(); // End-of-file, but not an error. Pass along for the end-of-file handlers. - } - else - { - error.SetErrorStringWithFormat("End-of-file.\n"); - } - status = eConnectionStatusEndOfFile; + error.SetErrorStringWithFormat("End-of-file.\n"); + status = eConnectionStatusLostConnection; } else if (bytes_read < 0) { |