From: Enrico Granata Date: Thu, 9 Jan 2014 02:28:25 +0000 (+0000) Subject: Patch by Ari Grant X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9bd4ae77be31aa707e91209a610a7e119362dc0;p=platform%2Fupstream%2Fllvm.git Patch by Ari Grant "Open LLDB and run: (lldb) script print lldb.debugger.GetInputFileHandle() This puts the debugger into a catatonic state and all interactions seem to enter a black hole. The reason is that executing this commnand actually *CLOSES* the input file handle and so all input is dropped on the floor. Oof! The fix is simple: flush a descriptor, instead of closing it, when transferring ownership." llvm-svn: 198835 --- diff --git a/lldb/scripts/Python/python-typemaps.swig b/lldb/scripts/Python/python-typemaps.swig index be76eae..24bb2b8 100644 --- a/lldb/scripts/Python/python-typemaps.swig +++ b/lldb/scripts/Python/python-typemaps.swig @@ -440,7 +440,7 @@ else // if (flags & __SRW) mode[i++] = 'a'; #endif - $result = PyFile_FromFile($1, const_cast(""), mode, fclose); + $result = PyFile_FromFile($1, const_cast(""), mode, fflush); } %typemap(in) (const char* string, int len) {