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

Unified Diff: runtime/bin/eventhandler_android.cc

Issue 18031003: Stop printing when stdout is closed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up test. Created 7 years, 6 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/eventhandler_linux.cc » ('j') | tests/standalone/io/stdout_close_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_android.cc
diff --git a/runtime/bin/eventhandler_android.cc b/runtime/bin/eventhandler_android.cc
index bbc8acbc8bec5ea726fc780a7cb6b62bb49d7e20..6bacfb60c4f28c99d2769b246733da6e2b0fa4bc 100644
--- a/runtime/bin/eventhandler_android.cc
+++ b/runtime/bin/eventhandler_android.cc
@@ -216,6 +216,8 @@ void EventHandlerImplementation::HandleInterruptFd() {
RemoveFromEpollInstance(epoll_fd_, sd);
intptr_t fd = sd->fd();
sd->Close();
+ // If stdout, reuse fd and direct to /dev/null.
+ if (fd == fileno(stdout)) USE(fopen("/dev/null", "r"));
kustermann 2013/06/27 11:51:09 A few questions here: - can we safely use fileno(
Anders Johnsen 2013/06/27 14:45:52 Done.
socket_map_.Remove(GetHashmapKeyFromFd(fd), GetHashmapHashFromFd(fd));
delete sd;
} else {
« no previous file with comments | « no previous file | runtime/bin/eventhandler_linux.cc » ('j') | tests/standalone/io/stdout_close_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698