Re: Missing crucial information in splice(2) manpage
From: Absee Seeab <hidden>
Date: 2024-08-26 04:40:50
Hi. Not sure I have an idea for an example program. As for a paragraph documenting it, here is a patch of one suggestion, though feel free to modify it or change it as needed.
--- splice.2 2024-08-26 07:39:07.553952939 +0300
+++ splice.2 2024-08-26 07:38:36.503953192 +0300@@ -63,7 +63,9 @@ .IR fd_in ; in this case, the file offset of .I fd_in -is not changed. +is not changed, and the offset pointed to by +.I off_in +is adjusted appropriately instead.. .P Analogous statements apply for .I fd_out
On Sun, Aug 25, 2024 at 12:08 PM Alejandro Colomar [off-list ref] wrote:
Hello Absee, On Sun, Aug 25, 2024 at 07:22:43AM GMT, Absee Seeab wrote:quoted
Hello, The splice(2) manpage (at least the version at man7.org) does not specify that off_in/off_out are written to after the operation. This, however, is done by the kernel (observed both by behaviour and source code). Plus I see similar functions (like copy_file_range and send_file) do document this fact, but splice does not, so it seems like a documentation omission. (This caused me a bit of a debugging headache today)Would you mind adding an example program to that page, and also some paragraph that documents that? Cheers, Alexquoted
Thanks-- <https://www.alejandro-colomar.es/>