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

Unified Diff: runtime/bin/eventhandler_macos.cc

Issue 8879053: Don't treat stdin from a terminal differently from piped input (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed debugging code Created 9 years 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 | « runtime/bin/eventhandler_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_macos.cc
diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc
index 0342745ea595cac4d75a3f703d49fdd8d1e4a7a8..526fd55bb986d2040205dbe3bf07d2f44f8d497f 100644
--- a/runtime/bin/eventhandler_macos.cc
+++ b/runtime/bin/eventhandler_macos.cc
@@ -241,9 +241,10 @@ intptr_t EventHandlerImplementation::GetPollEvents(struct pollfd* pollfd) {
event_mask = (1 << kErrorEvent);
} else {
if (sd->IsPipe()) {
- // For stdin when reading from a terminal treat POLLIN with 0
- // available bytes as end-of-file.
- if (sd->fd() == STDIN_FILENO && isatty(sd->fd())) {
+ // When reading from stdin (either from a terminal or piped
+ // input) treat POLLIN with 0 available bytes as
+ // end-of-file.
+ if (sd->fd() == STDIN_FILENO) {
event_mask = (1 << kCloseEvent);
sd->MarkClosedRead();
}
« no previous file with comments | « runtime/bin/eventhandler_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698