Export to GitHub

pysendfile - issue #4

FreeBSD implementation is broken


Posted on Feb 3, 2011 by Happy Monkey

From freebsd man page:

> When using a socket marked for non-blocking I/O, sendfile() may send > fewer bytes than requested. In this case, the number of bytes > success-fully written is returned in *sbytes (if specified), and the > error EAGAIN is returned.

...and the similar note about EBUSY, later in the page.

Current code just raises such errors without checking if data has been sent. Instead of raising exception it should return the number of bytes sent.

Comment #1

Posted on Feb 3, 2011 by Happy Monkey

This should now be fixed in r10.

Status: Fixed

Labels:
Type-Defect Priority-Medium