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

2019-04-12 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
keywords: +patch
pull_requests: +12734
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-04-07 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Right. So this is a hard problem for anyone to solve, and therefore os.sendfile 
should be the one solving it, not the caller of sendfile, right?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-04-05 Thread Giampaolo Rodola'


Giampaolo Rodola'  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-04-05 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: os.sendfile() on BSD and macOS does not return bytes sent on EINTR -> 
os.sendfile() on BSD, macOS don't return bytes sent on EINTR
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com