public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sendfile.2: pull in_fd type requirements up to 6.7
@ 2023-12-21  1:31 наб
  2023-12-21 11:08 ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: наб @ 2023-12-21  1:31 UTC (permalink / raw)
  To: Alejandro Colomar (man-pages); +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]

But this does mean that since 5.12 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>
---
 man2/sendfile.2 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

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 @@ .SH DESCRIPTION
 .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
-- 
2.39.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-21 13:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-21  1:31 [PATCH] sendfile.2: pull in_fd type requirements up to 6.7 наб
2023-12-21 11:08 ` Alejandro Colomar
2023-12-21 13:29   ` наб
2023-12-21 13:41     ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox