summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Debugger.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-05-16 00:11:54 +0000
committerGreg Clayton <gclayton@apple.com>2012-05-16 00:11:54 +0000
commit0d69a3a4b37dc9367d35bac541a806efa0f0b881 (patch)
tree626704abc679c8687199f61293321b3ad0ce3f64 /lldb/source/Core/Debugger.cpp
parent984997b3a04aff3ebc2b9dc4b0902b64584c7448 (diff)
downloadbcm5719-llvm-0d69a3a4b37dc9367d35bac541a806efa0f0b881.tar.gz
bcm5719-llvm-0d69a3a4b37dc9367d35bac541a806efa0f0b881.zip
<rdar://problem/11246147>
Make sure our debugger STDIN read thread shuts down quickly when we are done with it. We had a case where the owner of the file handle was not closing it and caused spins. llvm-svn: 156879
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r--lldb/source/Core/Debugger.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 250486a3aed..628d7600448 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -387,8 +387,14 @@ Debugger::Clear()
}
}
BroadcasterManager::Clear ();
- DisconnectInput();
-
+
+ // Close the input file _before_ we close the input read communications class
+ // as it does NOT own the input file, our m_input_file does.
+ GetInputFile().Close ();
+ // Now that we have closed m_input_file, we can now tell our input communication
+ // class to close down. Its read thread should quickly exit after we close
+ // the input file handle above.
+ m_input_comm.Clear ();
}
bool
OpenPOWER on IntegriCloud