Host::StopMonitoringChildProcess has been removed. Provide a substitute.
llvm-svn: 122835
diff --git a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
index 0b47fc7..e6a7d6f 100644
--- a/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
+++ b/lldb/source/Plugins/Process/Linux/ProcessMonitor.cpp
@@ -459,7 +459,7 @@
m_operation_thread(LLDB_INVALID_HOST_THREAD),
m_pid(LLDB_INVALID_PROCESS_ID),
m_terminal_fd(-1),
- m_monitor_handle(0),
+ m_monitor_thread(LLDB_INVALID_HOST_THREAD),
m_client_fd(-1),
m_server_fd(-1)
{
@@ -499,7 +499,7 @@
}
// Finally, start monitoring the child process for change in state.
- if (!(m_monitor_handle = Host::StartMonitoringChildProcess(
+ if (!(m_monitor_thread = Host::StartMonitoringChildProcess(
ProcessMonitor::MonitorCallback, this, GetPID(), true)))
{
error.SetErrorToGenericError();
@@ -510,7 +510,7 @@
ProcessMonitor::~ProcessMonitor()
{
- Host::StopMonitoringChildProcess(m_monitor_handle);
+ StopMonitoringChildProcess();
StopOperationThread();
close(m_terminal_fd);
@@ -923,3 +923,16 @@
return (dup2(fd, target_fd) == -1) ? false : true;
}
+
+void
+ProcessMonitor::StopMonitoringChildProcess()
+{
+ lldb::thread_result_t thread_result;
+
+ if (m_monitor_thread != LLDB_INVALID_HOST_THREAD)
+ {
+ Host::ThreadCancel(m_monitor_thread, NULL);
+ Host::ThreadJoin(m_monitor_thread, &thread_result, NULL);
+ m_monitor_thread = LLDB_INVALID_HOST_THREAD;
+ }
+}