summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Debugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r--lldb/source/Core/Debugger.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index f28c261b414..72449efb4c3 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -410,7 +410,10 @@ Debugger::SetInputFileHandle (FILE *fh, bool tranfer_ownership)
// Disconnect from any old connection if we had one
m_input_comm.Disconnect ();
- m_input_comm.SetConnection (new ConnectionFileDescriptor (in_file.GetDescriptor(), true));
+ // Pass false as the second argument to ConnectionFileDescriptor below because
+ // our "in_file" above will already take ownership if requested and we don't
+ // want to objects trying to own and close a file descriptor.
+ m_input_comm.SetConnection (new ConnectionFileDescriptor (in_file.GetDescriptor(), false));
m_input_comm.SetReadThreadBytesReceivedCallback (Debugger::DispatchInputCallback, this);
Error error;
OpenPOWER on IntegriCloud