[Lldb-commits] [lldb] r190733 - Stop closing terminal fd from ProcessMonitor. It is owned by ConnectionFileDescriptor.
Andrew Kaylor
andrew.kaylor at intel.com
Fri Sep 13 17:17:31 PDT 2013
Author: akaylor
Date: Fri Sep 13 19:17:31 2013
New Revision: 190733
URL: http://llvm.org/viewvc/llvm-project?rev=190733&view=rev
Log:
Stop closing terminal fd from ProcessMonitor. It is owned by ConnectionFileDescriptor.
Modified:
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp?rev=190733&r1=190732&r2=190733&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Fri Sep 13 19:17:31 2013
@@ -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
Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=190733&r1=190732&r2=190733&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Fri Sep 13 19:17:31 2013
@@ -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
More information about the lldb-commits
mailing list