Index: runtime/bin/platform_android.cc |
diff --git a/runtime/bin/platform_android.cc b/runtime/bin/platform_android.cc |
index dfa2e27ac82cd2dc1ce231e11972883afe687386..445ea014dcc88ce9659335be2ef920d3dc02895b 100644 |
--- a/runtime/bin/platform_android.cc |
+++ b/runtime/bin/platform_android.cc |
@@ -11,6 +11,8 @@ |
#include <string.h> // NOLINT |
#include <unistd.h> // NOLINT |
+#include "bin/fdutils.h" |
+ |
namespace dart { |
namespace bin { |
@@ -64,6 +66,18 @@ void Platform::FreeEnvironment(char** env, intptr_t count) { |
delete[] env; |
} |
+ |
+void Platform::PrintBlocking(FILE* file, const char* format, ...) { |
+ int fd = fileno(file); |
+ FDUtils::SetBlocking(fd); |
+ va_list args; |
+ va_start(args, format); |
+ vfprintf(file, format, args); |
+ fflush(file); |
+ va_end(args); |
+ FDUtils::SetNonBlocking(fd); |
+} |
+ |
} // namespace bin |
} // namespace dart |