Re: [PATCH] sendfile.2: pull in_fd type requirements up to 6.7

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

 



Hey наб,

> Cc: "Alejandro Colomar (man-pages)" <alx.manpages@xxxxxxxxx>

Please use <alx@xxxxxxxxxx>; I'm deprecating my gmail account.

On Thu, Dec 21, 2023 at 02:31:35AM +0100, наб wrote:
> But this does mean that since 5.12 supports

Did you mean "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@xxxxxxxxxxxxxxxxxx>
> ---
>  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

LGTM.

Have a lovely day,
Alex

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

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