[Lldb-commits] [lldb] r215608 - Don't enable STDIN for cases where we are supplying lines to be run in the embedded python interpreter.

Greg Clayton gclayton at apple.com
Wed Aug 13 17:44:41 PDT 2014


Author: gclayton
Date: Wed Aug 13 19:44:40 2014
New Revision: 215608

URL: http://llvm.org/viewvc/llvm-project?rev=215608&view=rev
Log:
Don't enable STDIN for cases where we are supplying lines to be run in the embedded python interpreter.

<rdar://problem/17949057>


Modified:
    lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp

Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=215608&r1=215607&r2=215608&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Wed Aug 13 19:44:40 2014
@@ -852,7 +852,7 @@ ScriptInterpreterPython::ExecuteOneLineW
 {
 
     Locker locker(this,
-                  ScriptInterpreterPython::Locker::AcquireLock | ScriptInterpreterPython::Locker::InitSession | (options.GetSetLLDBGlobals() ? ScriptInterpreterPython::Locker::InitGlobals : 0),
+                  ScriptInterpreterPython::Locker::AcquireLock | ScriptInterpreterPython::Locker::InitSession | (options.GetSetLLDBGlobals() ? ScriptInterpreterPython::Locker::InitGlobals : 0) | Locker::NoSTDIN,
                   ScriptInterpreterPython::Locker::FreeAcquiredLock | ScriptInterpreterPython::Locker::TearDownSession);
 
     PyObject *py_return = nullptr;
@@ -1016,7 +1016,7 @@ ScriptInterpreterPython::ExecuteMultiple
     Error error;
     
     Locker locker(this,
-                  ScriptInterpreterPython::Locker::AcquireLock      | ScriptInterpreterPython::Locker::InitSession | (options.GetSetLLDBGlobals() ? ScriptInterpreterPython::Locker::InitGlobals : 0),
+                  ScriptInterpreterPython::Locker::AcquireLock      | ScriptInterpreterPython::Locker::InitSession | (options.GetSetLLDBGlobals() ? ScriptInterpreterPython::Locker::InitGlobals : 0) | Locker::NoSTDIN,
                   ScriptInterpreterPython::Locker::FreeAcquiredLock | ScriptInterpreterPython::Locker::TearDownSession);
 
     PythonObject return_value;





More information about the lldb-commits mailing list