[issue36488] os.sendfile() on BSD, macOS don't return bytes sent on EINTR

Giampaolo Rodola' report at bugs.python.org
Fri Apr 5 14:44:05 EDT 2019


Giampaolo Rodola' <g.rodola at gmail.com> added the comment:

sendfile() on BSD/OSX is complicated by the headers/trailers args. You'll have to take that into account in the retry logic, adding unnecessary complexity. Since sendfile() may already return fewer bytes than requested (e.g. non-blocking sockets or big files) it's just easier to return the bytes sent thus far (if any). I can work on a patch once I find some time.

> Wasn't the point of PEP475 that all EINTR returns would be explicitly handled by retrying rather than forcing the user to handle it?

>From PEP475: <<[...] to relieve application code from the burden of doing so>>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36488>
_______________________________________


More information about the Python-bugs-list mailing list