summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/sendfile.2
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1998-11-06 19:35:58 +0000
committerdg <dg@FreeBSD.org>1998-11-06 19:35:58 +0000
commitd76c9ae77d726238f555f7117d67426fe7da5e8e (patch)
tree23b0a492051b619c8979ac762c8bc356cc393eac /lib/libc/sys/sendfile.2
parent3faff5bf0f0709a66e1cbc47fdc9bef963d8c844 (diff)
downloadFreeBSD-src-d76c9ae77d726238f555f7117d67426fe7da5e8e.zip
FreeBSD-src-d76c9ae77d726238f555f7117d67426fe7da5e8e.tar.gz
Added info about non-blocking support.
Diffstat (limited to 'lib/libc/sys/sendfile.2')
-rw-r--r--lib/libc/sys/sendfile.216
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2
index 20ca6c8..58d6157 100644
--- a/lib/libc/sys/sendfile.2
+++ b/lib/libc/sys/sendfile.2
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id$
+.\" $Id: sendfile.2,v 1.1 1998/11/05 14:43:29 dg Exp $
.\"
.Dd November 5, 1998
.Dt SENDFILE 2
@@ -82,6 +82,16 @@ variable pointed to by
The
.Fa flags
argument is currently undefined and should be specified as 0.
+.Pp
+When using a socket marked for non-blocking I/O,
+.Fn sendfile
+may send fewer bytes than requested. In this case, the number of bytes successfully
+written is returned in
+.Fa *sbytes
+(if specified),
+and the error
+.Er EAGAIN
+is returned.
.Sh IMPLEMENTATION NOTES
.Pp
The FreeBSD implementation of
@@ -123,6 +133,10 @@ An error occurred while reading from
.Fa fd .
.It Bq Er EFAULT
An invalid address was specified for a parameter.
+.It Bq Er 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
+.Fa *sbytes .
.El
.Sh SEE ALSO
.Xr open 2 ,
OpenPOWER on IntegriCloud