Thien-Thi Nguyen <t...@gnuvola.org> skribis:

> My reading of sendfile(2) is that it does its best to send as much as
> possible, but does not guarantee sending everything.  What it does
> succeed in sending, it reports to the caller.  The caller loops as
> desired, after evaluating (in some caller-meaningful way) the returned
> information.

Just a note, this information is definitely not conveyed by the man page:

   sendfile()  copies  data  between one file descriptor and another.  

   [...]

   count is the number of bytes to copy between the file descriptors.

Of course the return type hints at a write(2)-like interface, but the
truth is that short writes had to be evidenced by experimental
validation, so to speak.

Ludo’.


Reply via email to