This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年02月21日 05:31 by socketpair, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (6) | |||
|---|---|---|---|
| msg128940 - (view) | Author: Марк Коренберг (socketpair) * | Date: 2011年02月21日 05:31 | |
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) |
|||
| msg130015 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) | Date: 2011年03月03日 23:24 | |
Again, it's not clear to me what you are complaining about. Please try to be more clear and/or provide a patch. |
|||
| msg130103 - (view) | Author: Марк Коренберг (socketpair) * | Date: 2011年03月05日 05:09 | |
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. To recover from this situation it is OK to call recv or send again in case of EINTR. All network functions (recv*, send*, accept, connect) are vulnerable for EINTR in practice. |
|||
| msg130104 - (view) | Author: Марк Коренберг (socketpair) * | Date: 2011年03月05日 05:12 | |
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-02/msg00457.html Okay, linux is not buggy :))) EINTR may occur if SA_RESTART is not specified in sigaction. |
|||
| msg130106 - (view) | Author: Vetoshkin Nikita (nvetoshkin) | Date: 2011年03月05日 06:01 | |
Here's a similar bug: http://bugs.python.org/issue7978. >EINTR may occur if SA_RESTART is not specified in sigaction. Some syscalls (like select) will generate EINTR despite SA_RESTART. man 7 signal |
|||
| msg221748 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年06月27日 22:29 | |
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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:13 | admin | set | github: 55475 |
| 2014年07月24日 16:36:25 | vstinner | set | status: open -> closed superseder: handle EINTR in the stdlib resolution: duplicate |
| 2014年06月27日 22:29:52 | vstinner | set | nosy:
+ vstinner messages: + msg221748 |
| 2011年03月05日 06:01:06 | nvetoshkin | set | nosy:
+ nvetoshkin messages: + msg130106 |
| 2011年03月05日 05:12:22 | socketpair | set | nosy:
giampaolo.rodola, segfaulthunter, socketpair messages: + msg130104 |
| 2011年03月05日 05:09:45 | socketpair | set | nosy:
giampaolo.rodola, segfaulthunter, socketpair messages: + msg130103 |
| 2011年03月03日 23:39:48 | segfaulthunter | set | nosy:
+ segfaulthunter |
| 2011年03月03日 23:24:28 | giampaolo.rodola | set | nosy:
+ giampaolo.rodola messages: + msg130015 |
| 2011年02月21日 05:31:30 | socketpair | create | |