summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2013-09-14 00:17:31 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2013-09-14 00:17:31 +0000
commit5e268993310d1dd1c62b6e888b1f2bf712098a51 (patch)
treeae397e56633d4fd09353a54522d32bd944fb88c2 /lldb
parent84f996fb2e4865452220fce20e2d16890b500828 (diff)
downloadbcm5719-llvm-5e268993310d1dd1c62b6e888b1f2bf712098a51.tar.gz
bcm5719-llvm-5e268993310d1dd1c62b6e888b1f2bf712098a51.zip
Stop closing terminal fd from ProcessMonitor. It is owned by ConnectionFileDescriptor.
llvm-svn: 190733
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp5
-rw-r--r--lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
index 329b7ea2360..7e0476caf9c 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
@@ -1629,9 +1629,12 @@ ProcessMonitor::StopMonitor()
{
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
diff --git a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
index 2e6c55f45c9..3d175182a8a 100644
--- a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
@@ -2187,9 +2187,12 @@ ProcessMonitor::StopMonitor()
{
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
OpenPOWER on IntegriCloud