sendfile.2: RETURN VALUE: note the possibility of "short sends"

See https://bugzilla.kernel.org/show_bug.cgi?id=97491

Reported-by: Gregor Jasny <igjasny@googlemail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-05-05 12:00:06 +02:00
parent 2a342fcf75
commit 3f4ed032f4
1 changed files with 5 additions and 0 deletions

View File

@ -109,6 +109,11 @@ changes the file offset appropriately.
If the transfer was successful, the number of bytes written to
.I out_fd
is returned.
Note that a successful call to
.BR sendfile ()
may write fewer bytes than requested;
the caller should be prepared to retry the call if there were unsent bytes.
On error, \-1 is returned, and
.I errno
is set appropriately.