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

Unified Diff: runtime/bin/eventhandler_linux.cc

Issue 12319067: Handle legacy epoll event on Linux. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | tests/standalone/standalone.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_linux.cc
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index 1bf9378aac2a309bc04abd33fbefbdd58fcb3e4a..7b5bd707acd67685363c626192fab313885a7416 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -314,6 +314,9 @@ intptr_t EventHandlerImplementation::GetPollEvents(intptr_t events,
event_mask = (1 << kCloseEvent);
sd->MarkClosedRead();
}
+ } else {
+ // Assert we never get an EPOLLHUP on a non-pipe file-descriptor.
+ ASSERT(events != EPOLLHUP);
}
if ((events & EPOLLOUT) != 0) {
@@ -324,6 +327,12 @@ intptr_t EventHandlerImplementation::GetPollEvents(intptr_t events,
event_mask |= (1 << kOutEvent);
}
}
+
+ if (events == (EPOLLHUP | EPOLLERR)) {
+ event_mask = (1 << kErrorEvent);
+ sd->MarkClosedWrite();
+ sd->MarkClosedRead();
+ }
}
return event_mask;
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698