diff options
author | dg <dg@FreeBSD.org> | 2003-12-01 22:12:50 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 2003-12-01 22:12:50 +0000 |
commit | da88330aaaf865884c9af2df08f70b7faf8c5b90 (patch) | |
tree | d64794d6f8ef338b44409cd97dcecd8abdf8c9f4 /lib/libc/sys | |
parent | 405a061dd5a9f59c37ad57e4866292004dfd96fb (diff) | |
download | FreeBSD-src-da88330aaaf865884c9af2df08f70b7faf8c5b90.zip FreeBSD-src-da88330aaaf865884c9af2df08f70b7faf8c5b90.tar.gz |
Fixed a bug in sendfile(2) where the sent data would be corrupted due
to sendfile(2) being erroneously automatically restarted after a signal
is delivered. Fixed by converting ERESTART to EINTR prior to exiting.
Updated manual page to indicate the potential EINTR error, its cause
and consequences.
Approved by: re@freebsd.org
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/sendfile.2 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index 96979ee..e2cac6a 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998, David Greenman +.\" Copyright (c) 2003, David G. Lawrence .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -191,6 +191,10 @@ An error occurred while reading from .Fa fd . .It Bq Er EFAULT An invalid address was specified for an argument. +.It Bq Er EINTR +A signal interrupted sendfile before it could be completed. If specified, the number +of bytes successfully sent will be returned in +.Fa *sbytes . .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 @@ -215,4 +219,4 @@ The .Fn sendfile system call and this manual page were written by -.An David Greenman Aq dg@root.com . +.An David G. Lawrence Aq dg@dglawrence.com . |