mirror of https://github.com/mkerrisk/man-pages
sendfile.2: Since 2.6.33, 'out_fd' can refer to any file type
Linux kernel commit cc56f7de7f00d188c7c4da1e9861581853b9e92f meant sendfile(2) can work with any output file. Therefore the 'out_fd' of sendfile(2) can refer to any file (since Linux 2.6.33). Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
c39f51b0f2
commit
fe0ed23f6f
|
@ -12,7 +12,7 @@
|
|||
.\"
|
||||
.\" 2005-03-31 Martin Pool <mbp@sourcefrog.net> mmap() improvements
|
||||
.\"
|
||||
.TH SENDFILE 2 2010-12-03 "Linux" "Linux Programmer's Manual"
|
||||
.TH SENDFILE 2 2011-09-11 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
sendfile \- transfer data between file descriptors
|
||||
.SH SYNOPSIS
|
||||
|
@ -92,10 +92,14 @@ The
|
|||
argument must correspond to a file which supports
|
||||
.BR mmap (2)-like
|
||||
operations
|
||||
(i.e., it cannot be a socket);
|
||||
and
|
||||
(i.e., it cannot be a socket).
|
||||
In Linux kernels before 2.6.33,
|
||||
.I out_fd
|
||||
must refer to a socket.
|
||||
Since Linux 2.6.33 it can be any file.
|
||||
If it is a regular file, then
|
||||
.BR sendfile()
|
||||
changes the file offset offset appropriately.
|
||||
|
||||
Applications may wish to fall back to
|
||||
.BR read (2)/ write (2)
|
||||
|
@ -165,7 +169,7 @@ to minimize the number of packets and to tune performance.
|
|||
|
||||
In Linux 2.4 and earlier,
|
||||
.I out_fd
|
||||
could refer to a regular file, and
|
||||
could also refer to a regular file, and
|
||||
.BR sendfile ()
|
||||
changed the current offset of that file.
|
||||
|
||||
|
|
Loading…
Reference in New Issue