Stop closing terminal fd from ProcessMonitor. It is owned by ConnectionFileDescriptor.
llvm-svn: 190733
diff --git a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
index 2e6c55f..3d17518 100644
--- a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
@@ -2187,9 +2187,12 @@
{
StopMonitoringChildProcess();
StopOpThread();
- CloseFD(m_terminal_fd);
CloseFD(m_client_fd);
CloseFD(m_server_fd);
+ // Note: ProcessPOSIX passes the m_terminal_fd file descriptor to
+ // Process::SetSTDIOFileDescriptor, which in turn transfers ownership of
+ // the descriptor to a ConnectionFileDescriptor object. Consequently
+ // even though still has the file descriptor, we shouldn't close it here.
}
void