[Lldb-commits] [lldb] 30a292c - [ScriptInterpreterPython] Remove buggy code to save/restore stdin.
Davide Italiano via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 7 12:43:32 PDT 2020
Author: Davide Italiano
Date: 2020-04-07T12:43:25-07:00
New Revision: 30a292c25df327eb35b341b919c4e9b5e80323be
URL: https://github.com/llvm/llvm-project/commit/30a292c25df327eb35b341b919c4e9b5e80323be
DIFF: https://github.com/llvm/llvm-project/commit/30a292c25df327eb35b341b919c4e9b5e80323be.diff
LOG: [ScriptInterpreterPython] Remove buggy code to save/restore stdin.
Discussed on lldb-dev with Pavel Labath. This doesn't work for
background processes [causes Python to be stuck forever], and it's
unclear whether it's needed. There's no test, also. If this turns
out to be useful, it can be recommitted with a functional implementation
and a test.
Added:
Modified:
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index ee94a183e0dc..c53b3bd0fb65 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -224,10 +224,6 @@ struct InitializePythonRAII {
public:
InitializePythonRAII()
: m_gil_state(PyGILState_UNLOCKED), m_was_already_initialized(false) {
- // Python will muck with STDIN terminal state, so save off any current TTY
- // settings so we can restore them.
- m_stdin_tty_state.Save(STDIN_FILENO, false);
-
InitializePythonHome();
#ifdef LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE
@@ -271,8 +267,6 @@ struct InitializePythonRAII {
// We initialized the threads in this function, just unlock the GIL.
PyEval_SaveThread();
}
-
- m_stdin_tty_state.Restore();
}
private:
More information about the lldb-commits
mailing list