[Lldb-commits] [lldb] r124711 - /lldb/trunk/source/Interpreter/CommandInterpreter.cpp

Caroline Tice ctice at apple.com
Tue Feb 1 17:17:56 PST 2011


Author: ctice
Date: Tue Feb  1 19:17:56 2011
New Revision: 124711

URL: http://llvm.org/viewvc/llvm-project?rev=124711&view=rev
Log:
Make sure the confirmation input reader calls fflush after writing its output.
(<rdar://problem/8946573>)


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

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=124711&r1=124710&r2=124711&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Tue Feb  1 19:17:56 2011
@@ -1117,7 +1117,10 @@
         if (out_fh)
         {
             if (reader.GetPrompt())
+            {
                 ::fprintf (out_fh, "%s", reader.GetPrompt());
+                ::fflush (out_fh);
+            }
         }
         break;
 
@@ -1126,7 +1129,10 @@
 
     case eInputReaderReactivate:
         if (out_fh && reader.GetPrompt())
+        {
             ::fprintf (out_fh, "%s", reader.GetPrompt());
+            ::fflush (out_fh);
+        }
         break;
 
     case eInputReaderGotToken:
@@ -1150,6 +1156,7 @@
             {
                 ::fprintf (out_fh, "Please answer \"y\" or \"n\"\n");
                 ::fprintf (out_fh, "%s", reader.GetPrompt());
+                ::fflush (out_fh);
             }
         }
         break;





More information about the lldb-commits mailing list