summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-07-23 12:16:51 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-07-23 12:16:51 +0000
commitc67976a7d0f48374dab986535bad445ffb728e00 (patch)
tree0fd0bdec7276bbde54b3b80b48242873c2f3532b
parent1b703d2054b19cc7cf25feb9f9c8742700d130f8 (diff)
parentd3811b6fb7218c4fd6a4ecc171217022e137b5dc (diff)
downloadillumos-joyent-c67976a7d0f48374dab986535bad445ffb728e00.tar.gz
[illumos-gate merge]
commit d3811b6fb7218c4fd6a4ecc171217022e137b5dc 9657 sendfile(3ext): off and EINVAL are not documented properly
-rw-r--r--usr/src/man/man3ext/sendfile.3ext10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/man/man3ext/sendfile.3ext b/usr/src/man/man3ext/sendfile.3ext
index ade1b0dfeb..38f974987e 100644
--- a/usr/src/man/man3ext/sendfile.3ext
+++ b/usr/src/man/man3ext/sendfile.3ext
@@ -3,7 +3,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH SENDFILE 3EXT "Nov 3, 2017"
+.TH SENDFILE 3EXT "Jul 19, 2018"
.SH NAME
sendfile \- send files over sockets or copy files to files
.SH SYNOPSIS
@@ -38,7 +38,11 @@ The \fBsendfile()\fR function can also be used to send buffers by pointing
Upon successful completion, \fBsendfile()\fR returns the total number of bytes
written to \fIout_fd\fR and also updates the offset to point to the byte that
follows the last byte read. Otherwise, it returns \fB-1\fR, and \fBerrno\fR is
-set to indicate the error.
+set to indicate the error. In some error cases \fBsendfile()\fR may still
+write some data before encountering an error and returning \fB-1\fR. When that
+occurs, \fIoff\fR is updated to point to the byte that follows the last byte
+copied and should be compared with its value before calling \fBsendfile()\fR to
+determine how much data was sent.
.SH ERRORS
.LP
The \fBsendfile()\fR function will fail if:
@@ -83,6 +87,8 @@ reading.
.RS 16n
The offset cannot be represented by the \fBoff_t\fR structure, or the length is
negative when cast to \fBssize_t\fR.
+.sp
+Fewer bytes were transferred than were requested.
.RE
.sp