From d7d9ec31dfe5d797307a7d107f0874260e7eab4a Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 30 Sep 2014 13:06:18 +0200 Subject: [PATCH] s3:unix_msg: document closing of fds in the receive handler Pair-Programmed-With: Volker Lendecke Signed-off-by: Michael Adam Signed-off-by: Volker Lendecke --- source3/lib/unix_msg/unix_msg.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/lib/unix_msg/unix_msg.h b/source3/lib/unix_msg/unix_msg.h index 6024804fc3e..56f7a40fafd 100644 --- a/source3/lib/unix_msg/unix_msg.h +++ b/source3/lib/unix_msg/unix_msg.h @@ -55,6 +55,13 @@ * 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. */ /** -- 2.11.4.GIT