aboutsummaryrefslogtreecommitdiffstats
path: root/man7/unix.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2018-07-15 10:30:11 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2018-07-15 10:33:42 +0200
commit5219daec26a5fed7f73ccd66e898948abf89ccae (patch)
tree46a66062d5e16d4ea086b913f779decbc22ed116 /man7/unix.7
parentc0e56ed687f4bae9adc2af19119917fbd8f552d2 (diff)
downloadman-pages-5219daec26a5fed7f73ccd66e898948abf89ccae.tar.gz
unix.7: One must send at least one byte of real data with ancillary data
When sending ancillary data, at least one byte of real data should also be sent. This is strictly necessary for stream sockets (verified by experiment). It is not required for datagram sockets on Linux (verified by experiment), but portable applications should do so. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/unix.7')
-rw-r--r--man7/unix.78
1 files changed, 8 insertions, 0 deletions
diff --git a/man7/unix.7 b/man7/unix.7
index 07f9e9bf30..905d5bc2f9 100644
--- a/man7/unix.7
+++ b/man7/unix.7
@@ -447,6 +447,14 @@ When sending ancillary data with
.BR sendmsg (2),
only one item of each of the above types may be included in the sent message.
.PP
+At least one byte of real data should be sent when sending ancillary data.
+On Linux, this is required to successfully send ancillary data over
+a UNIX domain stream socket.
+When sending ancillary data over a UNIX domain datagram socket,
+it is not necessary on Linux to send any accompanying real data.
+However, portable applications should also include at least one byte
+of real data when sending ancillary data over a datagram 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