s3:unix_msg: document closing of fds in the receive handler
authorMichael Adam <obnox@samba.org>
Tue, 30 Sep 2014 11:06:18 +0000 (13:06 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 30 Sep 2014 14:36:10 +0000 (16:36 +0200)
Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
source3/lib/unix_msg/unix_msg.h

index 6024804fc3e1fab565314e43304b6a9da808acea..56f7a40fafd1c78cb555f3c020b06514b999ce10 100644 (file)
  * If unix_msg_send is asked to send a message larger than fragment_size, it
  * will try sending the message in pieces with proper framing, the receiving
  * side will reassemble the messages.
+ *
+ * fd-passing is supported.
+ * Note that by default the fds passed to recv_callback are closed by
+ * the receive handler in order to avoid fd-leaks. If the provider of
+ * the recv_callback wants to use a passed file descriptor after the
+ * callback returns, it must copy the fd away and set the corresponding
+ * entry in the "fds" array to -1.
  */
 
 /**