From a31baf081b9bbe51ad411249dbdc67abbcedad41 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 10 Mar 2016 20:49:32 +0000 Subject: Fixed the python interpreter so that it correctly inherits the top IOHandler's files instead of always using stdin/out/err. Removed lldb_private::File::Duplicate() and the copy constructor and the assignment operator that used to duplicate the file handles and made them private so no one uses them. Previously the lldb_private::File::Duplicate() function duplicated files that used file descriptors, (int) but not file streams (FILE *), so the lldb_private::File::Duplicate() function only worked some of the time. No one else excep thee ScriptInterpreterPython was using these functions, so that aren't needed nor desired. Previously every time you would drop into the python interpreter we would duplicate files, and now we avoid this file churn. llvm-svn: 263161 --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h index 4c6eb394989..83702a02554 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h @@ -581,6 +581,9 @@ protected: bool GetEmbeddedInterpreterModuleObjects (); + bool + SetStdHandle(File &file, const char *py_name, PythonFile &save_file, const char *mode); + PythonFile m_saved_stdin; PythonFile m_saved_stdout; PythonFile m_saved_stderr; -- cgit v1.2.3