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
This commit is contained in:
Enrico Granata 2014-01-09 02:28:25 +00:00
parent 83b11aae18
commit d9bd4ae77b
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@
else // if (flags & __SRW)
mode[i++] = 'a';
#endif
$result = PyFile_FromFile($1, const_cast<char*>(""), mode, fclose);
$result = PyFile_FromFile($1, const_cast<char*>(""), mode, fflush);
}
%typemap(in) (const char* string, int len) {