mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
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.
This commit is contained in:
parent
61e1eeec6f
commit
e73cbde15f
3
epoll.c
3
epoll.c
@ -235,7 +235,8 @@ epoll_apply_changes(struct event_base *base)
|
|||||||
*/
|
*/
|
||||||
event_debug((" ADD was redundant"));
|
event_debug((" ADD was redundant"));
|
||||||
} else if (op == EPOLL_CTL_DEL &&
|
} 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,
|
/* If a delete fails with one of these errors,
|
||||||
* that's fine too: we closed the fd before we
|
* that's fine too: we closed the fd before we
|
||||||
* got around to calling epoll_dispatch. */
|
* got around to calling epoll_dispatch. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user