Giampaolo Rodola' <[email protected]> added the comment:
Patch in attachment provides a complete test suite.
It also fixes a problem which occurred on BSD platforms when using non-blocking
sockets: EAGAIN/EBUSY are now raised if the transmitted data == 0 bytes
reflecting socket's send() behavior:
+ if (ret < 0) {
+ if ((errno == EAGAIN) || (errno == EBUSY)) {
+ if (sbytes != 0) {
+ // some data has been sent
+ goto done;
+ }
+ else {
+ // no data has been sent; upper application is supposed
+ // to retry on EAGAIN or EBUSY
+ return posix_error();
+ }
+ }
+ return posix_error();
+ }
+ goto done;
The test suite shows that "trailer" argument does not work.
I couldn't manage to figure out what's wrong though.
----------
Added file: http://bugs.python.org/file20688/sendfile_v6.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10882>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com