[Lldb-commits] [lldb] r168503 - /lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp

Daniel Malea daniel.malea at intel.com
Thu Nov 22 10:21:05 PST 2012


Author: dmalea
Date: Thu Nov 22 12:21:05 2012
New Revision: 168503

URL: http://llvm.org/viewvc/llvm-project?rev=168503&view=rev
Log:
Remove call to StopMonitor() from ProcessMonitor::Detach()
- StopMonitor() is called anyways from ProcessMonitor destructor later
- resolves hang in TestEvents.py

Patch by Matt Kopec!


Modified:
    lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp

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=168503&r1=168502&r2=168503&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Thu Nov 22 12:21:05 2012
@@ -1219,7 +1219,7 @@
         }
 
         process->SendMessage(message);
-        stop_monitoring = message.GetKind() == ProcessMessage::eExitMessage;
+        stop_monitoring = !process->IsAlive();
     }
 
     return stop_monitoring;
@@ -1657,7 +1657,6 @@
         DetachOperation op(error);
         DoOperation(&op);
     }
-    StopMonitor();
     return error;
 }
 
@@ -1705,6 +1704,7 @@
 
     Host::ThreadCancel(m_operation_thread, NULL);
     Host::ThreadJoin(m_operation_thread, &result, NULL);
+    m_operation_thread = LLDB_INVALID_HOST_THREAD;
 }
 
 void





More information about the lldb-commits mailing list