summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 531a14c00fa..c771be0bf9a 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1479,12 +1479,7 @@ Process::SetExitStatus (int status, const char *cstr)
else
m_exit_string.clear();
- // When we exit, we no longer need to the communication channel
- m_stdio_communication.Disconnect();
- m_stdio_communication.StopReadThread();
- m_stdin_forward = false;
-
- // And we don't need the input reader anymore as well
+ // When we exit, we don't need the input reader anymore
if (m_process_input_reader)
{
m_process_input_reader->SetIsDone(true);
@@ -4159,6 +4154,10 @@ Process::ShouldBroadcastEvent (Event *event_ptr)
case eStateExited:
case eStateUnloaded:
m_stdio_communication.SynchronizeWithReadThread();
+ m_stdio_communication.Disconnect();
+ m_stdio_communication.StopReadThread();
+ m_stdin_forward = false;
+
// fall-through
case eStateConnected:
case eStateAttaching:
OpenPOWER on IntegriCloud