summaryrefslogtreecommitdiff
path: root/epoll.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-07-08 14:41:02 -0400
committerNick Mathewson <nickm@torproject.org>2010-07-08 14:41:02 -0400
commite73cbde15f7fe71649c2d9783a03a805edc10027 (patch)
treebdffacbe844d02f6ef45bf8df52ca6398e788bbc /epoll.c
parent61e1eeec6f914a0c00955e7f376f17010446c78e (diff)
downloadlibevent-e73cbde15f7fe71649c2d9783a03a805edc10027.tar.gz
Suppress a spurious EPERM warning in epoll.c
It's okay for us to get an EPERM when doing an EPOLL_DEL on an fd; it just means that before we got a chance to the EPOLL_DEL, we closed the fd and reopened a new non-socket that wound up having the same fd. Partial fix for Bug 3019973.
Diffstat (limited to 'epoll.c')
-rw-r--r--epoll.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epoll.c b/epoll.c
index 6c3cf33f..6707ae8a 100644
--- a/epoll.c
+++ b/epoll.c
@@ -235,7 +235,8 @@ epoll_apply_changes(struct event_base *base)
*/
event_debug((" ADD was redundant"));
} else if (op == EPOLL_CTL_DEL &&
- (errno == ENOENT || errno == EBADF)) {
+ (errno == ENOENT || errno == EBADF ||
+ errno == EPERM)) {
/* If a delete fails with one of these errors,
* that's fine too: we closed the fd before we
* got around to calling epoll_dispatch. */