Make sure the confirmation input reader calls fflush after writing its output.
(<rdar://problem/8946573>)
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124711 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/CommandInterpreter.cpp b/source/Interpreter/CommandInterpreter.cpp
index a106b36..e239c55 100644
--- a/source/Interpreter/CommandInterpreter.cpp
+++ b/source/Interpreter/CommandInterpreter.cpp
@@ -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;