mirror of https://github.com/mkerrisk/man-pages
unix.7: Clarify treatment of incoming ancillary data if 'msg_control' is NULL
If no buffer is supplied for incoming ancillary data, then the data is lost. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
4564dd1fee
commit
c0e56ed687
12
man7/unix.7
12
man7/unix.7
|
@ -447,12 +447,20 @@ When sending ancillary data with
|
||||||
.BR sendmsg (2),
|
.BR sendmsg (2),
|
||||||
only one item of each of the above types may be included in the sent message.
|
only one item of each of the above types may be included in the sent message.
|
||||||
.PP
|
.PP
|
||||||
If the space allocated for receiving incoming ancillary data is too small,
|
If the space allocated for receiving incoming ancillary data is too small
|
||||||
then the ancillary data is truncated to the number of headers
|
then the ancillary data is truncated to the number of headers
|
||||||
that will fit in the supplied buffer (or, in the case of an
|
that will fit in the supplied buffer (or, in the case of an
|
||||||
.BR SCM_RIGHTS
|
.BR SCM_RIGHTS
|
||||||
file descriptor list, the list of file descriptors may be truncated).
|
file descriptor list, the list of file descriptors may be truncated).
|
||||||
In the event of such truncation, the
|
If no buffer is provided for incoming ancillary data (i.e., the
|
||||||
|
.I msg_control
|
||||||
|
field of the
|
||||||
|
.I msghdr
|
||||||
|
structure supplied to
|
||||||
|
.BR recvmsg (2)
|
||||||
|
is NULL),
|
||||||
|
then the incoming ancillary data is discarded.
|
||||||
|
In both of these cases, the
|
||||||
.BR MSG_CTRUNC
|
.BR MSG_CTRUNC
|
||||||
flag will be set in the
|
flag will be set in the
|
||||||
.I msg.msg_flags
|
.I msg.msg_flags
|
||||||
|
|
Loading…
Reference in New Issue