Re: Missing crucial information in splice(2) manpage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Absee,

On Mon, Aug 26, 2024 at 07:40:37AM GMT, Absee Seeab wrote:
> 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.

Maybe write a program that demonstrates that the statement is true
without having to look at the kernel source?  That will probably serve
for the EXAMPLES section.  :)

Have a lovely day!
Alex

> 
> --- 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 <alx@xxxxxxxxxx> wrote:
> >
> > Hello Absee,
> >
> > On Sun, Aug 25, 2024 at 07:22:43AM GMT, Absee Seeab wrote:
> > > 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,
> > Alex
> >
> > >
> > > Thanks
> > >
> >
> > --
> > <https://www.alejandro-colomar.es/>
> 

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux