Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Unified Diff: runtime/bin/stdin_android.cc

Issue 24315008: Make stdin blocking when using Stdin::readByte and readLine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/stdin_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/stdin_android.cc
diff --git a/runtime/bin/stdin_android.cc b/runtime/bin/stdin_android.cc
index 9082deb25c2b5316766f90d864e89621760ac379..816023a7ecfb94fd577117c65acdc1b9424b28b3 100644
--- a/runtime/bin/stdin_android.cc
+++ b/runtime/bin/stdin_android.cc
@@ -8,16 +8,19 @@
#include <termios.h> // NOLINT
#include "bin/stdin.h"
+#include "bin/fdutils.h"
namespace dart {
namespace bin {
int Stdin::ReadByte() {
+ FDUtils::SetBlocking(fileno(stdin));
int c = getchar();
if (c == EOF) {
c = -1;
}
+ FDUtils::SetNonBlocking(fileno(stdin));
return c;
}
« no previous file with comments | « no previous file | runtime/bin/stdin_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698