Stop closing terminal fd from ProcessMonitor. It is owned by ConnectionFileDescriptor.
llvm-svn: 190733
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
index 329b7ea..7e0476c 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
@@ -1629,9 +1629,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