Skip to content

Commit

Permalink
Avoid giving a spurious warning when timerfd support is unavailable
Browse files Browse the repository at this point in the history
We forgot to do the obligatory "Check if there is no syscall there"
dance when calling timerfd_create().

(Commit message by Nick)
  • Loading branch information
hart-NTP authored and nmathewson committed Jun 18, 2012
1 parent e7bf4c8 commit 1aaf9f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,14 @@ epoll_init(struct event_base *base)
epollop->timerfd = -1;
}
} else {
event_warn("timerfd_create");
if (errno != EINVAL && errno != ENOSYS) {
/* These errors probably mean that we were
* compiled with timerfd/TFD_* support, but
* we're running on a kernel that lacks those.
*/
event_warn("timerfd_create");
}
epollop->timerfd = -1;
}
} else {
epollop->timerfd = -1;
Expand Down

0 comments on commit 1aaf9f0

Please sign in to comment.