Fixed a deadlock that was slowing down processes when they shut down. A 3 second...
authorGreg Clayton <gclayton@apple.com>
Wed, 3 Jun 2015 00:34:01 +0000 (00:34 +0000)
committerGreg Clayton <gclayton@apple.com>
Wed, 3 Jun 2015 00:34:01 +0000 (00:34 +0000)
llvm-svn: 238893

lldb/source/Target/Process.cpp

index cc3b876..637360d 100644 (file)
@@ -1455,8 +1455,8 @@ Process::SetExitStatus (int status, const char *cstr)
         m_exit_string.clear();
 
     // When we exit, we no longer need to the communication channel
-    m_stdio_communication.StopReadThread();
     m_stdio_communication.Disconnect();
+    m_stdio_communication.StopReadThread();
     m_stdin_forward = false;
 
     // And we don't need the input reader anymore as well
@@ -4036,8 +4036,8 @@ Process::Destroy (bool force_kill)
             DidDestroy();
             StopPrivateStateThread();
         }
-        m_stdio_communication.StopReadThread();
         m_stdio_communication.Disconnect();
+        m_stdio_communication.StopReadThread();
         m_stdin_forward = false;
 
         if (m_process_input_reader)