diff options
author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2023-12-21 02:31:35 +0100 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2023-12-21 14:40:07 +0100 |
commit | aa1e1b1dd787db952efffe4551e85de62523c54c (patch) | |
tree | 9965cdc448653f7ebe07e28588cb5a730e982373 | |
parent | b34c2340657cfe467a0c2cde4933422bddf4348b (diff) |
sendfile.2: Pull in_fd type requirements up to 6.7
But this does mean that since 5.12, it supports
(5.12 has ISREG|ISBLK, this actually matches 6.0 semantics):
any -> pipe via splice
seekable -> any
Also, there are many seekable files which aren't regular,
and the offset is updated regardless.
This is obvious, but the wording is clumsy.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r-- | man2/sendfile.2 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/man2/sendfile.2 b/man2/sendfile.2 index 24de71072..a385949c1 100644 --- a/man2/sendfile.2 +++ b/man2/sendfile.2 @@ -91,12 +91,21 @@ argument must correspond to a file which supports .BR mmap (2)-like operations (i.e., it cannot be a socket). +Except since Linux 5.12 +.\" commit b964bf53e540262f2d12672b3cca10842c0172e7 +and if +.I out_fd +is a pipe, in which case +.BR sendfile () +desugars to a +.BR splice (2) +and its restrictions apply. .P Before Linux 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 +If it's seekable, then .BR sendfile () changes the file offset appropriately. .SH RETURN VALUE |