New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asyncore does not handle EINTR in recv, send, connect, accept, #55475
Comments
in spite of usage of non-blocking IO, syscalls may return EINTR if signal arrive during some syscalls. It is desirable to re-call syscall after receiving EINTR. Trivial loops should be implemented around (recv, send, connect, accept) |
Again, it's not clear to me what you are complaining about. |
When using non-blocking IO, we issue select (or poll,epoll), and after that kernel should guarantee, that recv or send will complete immediatelly, transferring data as needed. But sometimes (as Linux is buggy), such operations results in EINTR error if some signal arrived during this call. In that case python exception generated and typically connection will be closed. |
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-02/msg00457.html Okay, linux is not buggy :))) |
Here's a similar bug: http://bugs.python.org/issue7978.
|
It was already discussed in other issues, the issue is not specific to asyncore: Python code should not handle EINTR. IMO the C module socket should handle EINTR for you. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: