[Lldb-commits] [PATCH] D19136: Don't disable stdin and stdout buffering on Windows
Adrian McCarthy via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 14 16:11:22 PDT 2016
amccarth created this revision.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.
Disabling buffering exposes a bug in the MS VS 2015 CRT implementation of fgets, where you sometimes have to hit Enter twice, depending on if the input had an odd or even number of characters.
This was hidden until a few days ago by the Python initialization which was re-enabling buffering on the streams. A few days ago, Enrico make the Python initialization on-demand, which exposed this problem.
@@ -1037,8 +1037,10 @@
::setbuf (stdin, NULL);
::setbuf (stdout, NULL);
m_debugger.SetErrorFileHandle (stderr, false);
m_debugger.SetOutputFileHandle (stdout, false);
@@ -1309,12 +1311,6 @@
main(int argc, char const *argv)
- // disable buffering on windows
- setvbuf(stdout, NULL, _IONBF, 0);
- setvbuf(stdin , NULL, _IONBF, 0);
// Convert wide arguments to UTF-8
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 733 bytes
Desc: not available
More information about the lldb-commits