Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/sys/sendfile.2
Show All 19 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd October 12, 2018 | .Dd January 24, 2019 | ||||
.Dt SENDFILE 2 | .Dt SENDFILE 2 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm sendfile | .Nm sendfile | ||||
.Nd send a file to a socket | .Nd send a file to a socket | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
.Pf non- Dv NULL , | .Pf non- Dv NULL , | ||||
the system will write the total number of bytes sent on the socket to the | the system will write the total number of bytes sent on the socket to the | ||||
variable pointed to by | variable pointed to by | ||||
.Fa sbytes . | .Fa sbytes . | ||||
.Pp | .Pp | ||||
The least significant 16 bits of | The least significant 16 bits of | ||||
.Fa flags | .Fa flags | ||||
argument is a bitmap of these values: | argument is a bitmap of these values: | ||||
.Bl -tag -offset indent | .Bl -tag -offset indent -width "SF_USER_READAHEAD" | ||||
glebius: Why this change? | |||||
Done Inline ActionsI will commit this change separately. Basically, I was fixing a linter issue: $ make -C ~/nfs/svn/freebsd/base/head/lib/libc sendfile.2lint [Creating objdir /usr/obj/usr/home/ngie/nfs/svn/freebsd/base/head/amd64.amd64/lib/msun...] mandoc -Tascii -Tlint /usr/home/ngie/nfs/svn/freebsd/base/head/lib/libc/sys/sendfile.2 mandoc: /usr/home/ngie/nfs/svn/freebsd/base/head/lib/libc/sys/sendfile.2:107:2: WARNING: missing -width in -tag list, using 6n: Bl -tag *** Error code 2 Stop. make: stopped in /home/ngie/nfs/svn/freebsd/base/head/lib/libc ngie: I will commit this change separately. Basically, I was fixing a linter issue:
```
$ make -C… | |||||
.It Dv SF_NODISKIO | .It Dv SF_NODISKIO | ||||
This flag causes | This flag causes | ||||
.Nm | .Nm | ||||
to return | to return | ||||
.Er EBUSY | .Er EBUSY | ||||
instead of blocking when a busy page is encountered. | instead of blocking when a busy page is encountered. | ||||
This rare situation can happen if some other process is now working | This rare situation can happen if some other process is now working | ||||
with the same region of the file. | with the same region of the file. | ||||
▲ Show 20 Lines • Show All 282 Lines • ▼ Show 20 Lines | |||||
.Fn sendfile | .Fn sendfile | ||||
system call | system call | ||||
and this manual page were written by | and this manual page were written by | ||||
.An David G. Lawrence Aq Mt dg@dglawrence.com . | .An David G. Lawrence Aq Mt dg@dglawrence.com . | ||||
The | The | ||||
.Fx 11 | .Fx 11 | ||||
implementation was written by | implementation was written by | ||||
.An Gleb Smirnoff Aq Mt glebius@FreeBSD.org . | .An Gleb Smirnoff Aq Mt glebius@FreeBSD.org . | ||||
.Sh BUGS | |||||
The | |||||
.Fn sendfile | |||||
system call will not fail, i.e., return | |||||
.Dv -1 | |||||
and set | |||||
.Va errno | |||||
to | |||||
.Er EFAULT , | |||||
if provided an invalid address for | |||||
.Fa sbytes . | |||||
Done Inline ActionsI'm not native speaker, but my reading of this phrase is ambigous: sendfile will not return -1 and fail with EFAULT in that case May be wording like this would be more clear: sendfile will not return -1 and will not set errno to EFAULT in that case ? glebius: I'm not native speaker, but my reading of this phrase is ambigous:
sendfile will not return -1… | |||||
Done Inline ActionsYou're right -- it was poorly worded. Let me reword it. ngie: You're right -- it was poorly worded. Let me reword it. |
Why this change?