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

Unified Diff: runtime/bin/eventhandler_linux.cc

Issue 177643002: Fix error-checking when calling timerfd_create. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | no next file » | 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 a7a1049203df9580db8619755e7eab9fc6148681..612f3cb811ecaf108d372ad31cfb98bf9c3fb27d 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -64,12 +64,12 @@ EventHandlerImplementation::EventHandlerImplementation() : shutdown_(false) {
static const int kEpollInitialSize = 64;
epoll_fd_ = TEMP_FAILURE_RETRY(epoll_create(kEpollInitialSize));
if (epoll_fd_ == -1) {
- FATAL("Failed creating epoll file descriptor");
+ FATAL1("Failed creating epoll file descriptor: %i", errno);
}
FDUtils::SetCloseOnExec(epoll_fd_);
timer_fd_ = TEMP_FAILURE_RETRY(timerfd_create(CLOCK_REALTIME, TFD_CLOEXEC));
- if (epoll_fd_ == -1) {
- FATAL("Failed creating timerfd file descriptor");
+ if (timer_fd_ == -1) {
+ FATAL1("Failed creating timerfd file descriptor: %i", errno);
}
// Register the timer_fd_ with the epoll instance.
struct epoll_event event;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698