Re: [PATCH v2] recv.2: Document MSG_CMSG_CLOEXEC as returned in msg_flags

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


Hi Matthew,

On 2023-07-17 01:47, Matthew House wrote:
> Signed-off-by: Matthew House <mattlloydhouse@xxxxxxxxx>
> ---
> Clarified that the argument comes from the recvmsg() call. It feels a bit
> redundant to name recvmsg() again here, given that the list of flags is
> immediately preceded by, "The msg_flags field in the msghdr is set on
> return of recvmsg(). It can contain several flags: [...]" But I'll let you
> be the judge of that.
>  man2/recv.2 | 9 +++++++++
>  1 file changed, 9 insertions(+)
> diff --git a/man2/recv.2 b/man2/recv.2
> index 660c103fb..1cd9f3e1b 100644
> --- a/man2/recv.2
> +++ b/man2/recv.2
> @@ -412,6 +412,15 @@ is returned to indicate that expedited or out-of-band data was received.
>  indicates that no data was received but an extended error from the socket
>  error queue.
> +.TP
> +.BR MSG_CMSG_CLOEXEC " (since Linux 2.6.23)"
> +.\" commit 4a19542e5f694cd408a32c3d9dc593ba9366e2d7
> +indicates that
> +was specified in the
> +.I flags
> +argument of
> +.BR recvmsg ().

I don't understand what's the purpose of this.  The kernel sets a bit
just to report to the caller that it set a bit?  No other purpose?
It feels very weird.  Of course, the caller already has that info,
doesn't it?


>  These calls return the number of bytes received, or \-1
>  if an error occurred.

GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux