bpo-39239: epoll.unregister() no longer ignores EBADF (GH-17882)

The select.epoll.unregister() method no longer ignores the EBADF
error.
This commit is contained in:
Victor Stinner 2020-01-07 15:00:02 +01:00 committed by GitHub
parent 10ac0cded2
commit 5b23f7618d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 6 deletions

View file

@ -1447,11 +1447,6 @@ pyepoll_internal_ctl(int epfd, int op, int fd, unsigned int events)
* though this argument is ignored. */
Py_BEGIN_ALLOW_THREADS
result = epoll_ctl(epfd, op, fd, &ev);
if (errno == EBADF) {
/* fd already closed */
result = 0;
errno = 0;
}
Py_END_ALLOW_THREADS
break;
default: