unix.7: Note behavior if buffer to receive ancillary data is too small

If the buffer supplied to recvmsg() to receive ancillary data is
too small, then the data is truncated and the MSG_CTRUNC flag is
set.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2018-07-08 11:00:23 +02:00
parent 13600496d3
commit c87721467e
1 changed files with 13 additions and 0 deletions

View File

@ -435,6 +435,19 @@ To receive a
message, the
.B SO_PASSCRED
option must be enabled on the socket.
.PP
If the space allocated for receiving incoming ancillary data is too small,
then the ancillary data is truncated to the number of headers
that will fit in the supplied buffer (or, in the case of an
.BR SCM_RIGHTS
file descriptor list, the list of file descriptors may be truncated).
In the event of such truncation, the
.BR MSG_CTRUNC
flag will be set in the
.I msg.msg_flags
value returned by
.BR recvmsg (2).
.\"
.SS Ioctls
The following
.BR ioctl (2)