Antoine Pitrou added the comment:

> Because otherwise sendfile() fails with EAGAIN many times before
> sending any actual data. 

EAGAIN on a blocking fd? Is it documented somewhere?
The Linux man page for sendfile() says:

       EAGAIN Nonblocking I/O has been selected using O_NONBLOCK and the
write would block.

FreeBSD apparently says something similar:

     [EAGAIN]           The socket is marked for non-blocking I/O and not all
                        data was sent due to the socket buffer being filled.
                        If specified, the number of bytes successfully sent
                        will be returned in *sbytes.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13564>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to