Bug report
Bug description:
Summary
Multiple sites in Modules/selectmodule.c check if (errno < 0) after close/epoll_ctl calls. Since errno is an int set to positive values (POSIX), this check is always false. Close errors are silently swallowed.
Fix
Change if (errno < 0) to if (retval < 0) (check the return value, not errno directly).
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Bug report
Bug description:
Summary
Multiple sites in
Modules/selectmodule.ccheckif (errno < 0)after close/epoll_ctl calls. Sinceerrnois anintset to positive values (POSIX), this check is always false. Close errors are silently swallowed.Fix
Change
if (errno < 0)toif (retval < 0)(check the return value, not errno directly).CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs