summaryrefslogtreecommitdiff
path: root/man/sd_bus_message_read_basic.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-08-28 21:18:14 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2020-08-30 18:09:39 +0100
commite2b40db616b4e723036f72a726e2f2f31d35ffe1 (patch)
tree8b57d9179f15a67622b5fec14476127d129de6a4 /man/sd_bus_message_read_basic.xml
parenta667ddf1327f55a5af5abef006b60fc42e998beb (diff)
downloadsystemd-e2b40db616b4e723036f72a726e2f2f31d35ffe1.tar.gz
man: document fd ownership for sd-bus fd marshalling
Fixes: #8003
Diffstat (limited to 'man/sd_bus_message_read_basic.xml')
-rw-r--r--man/sd_bus_message_read_basic.xml24
1 files changed, 13 insertions, 11 deletions
diff --git a/man/sd_bus_message_read_basic.xml b/man/sd_bus_message_read_basic.xml
index e1e993434a..dc9f960618 100644
--- a/man/sd_bus_message_read_basic.xml
+++ b/man/sd_bus_message_read_basic.xml
@@ -52,17 +52,19 @@
</para>
<para>
- If <parameter>p</parameter> is not <constant>NULL</constant>, it should contain
- a pointer to an appropriate object. For example, if <parameter>type</parameter>
- is <constant>'y'</constant>, the object passed in <parameter>p</parameter>
- should have type <type>uint8_t *</type>. If <parameter>type</parameter> is
- <constant>'s'</constant>, the object passed in <parameter>p</parameter> should
- have type <type>const char **</type>. Note that, if the basic type is a pointer
- (e.g., <type>const char *</type> in the case of a string), the pointer is only
- borrowed and the contents must be copied if they are to be used after the end
- of the messages lifetime. Similarly, during the lifetime of such a pointer, the
- message must not be modified. See the table below for a complete list of allowed
- types.
+ If <parameter>p</parameter> is not <constant>NULL</constant>, it should contain a pointer to an
+ appropriate object. For example, if <parameter>type</parameter> is <constant>'y'</constant>, the object
+ passed in <parameter>p</parameter> should have type <type>uint8_t *</type>. If
+ <parameter>type</parameter> is <constant>'s'</constant>, the object passed in <parameter>p</parameter>
+ should have type <type>const char **</type>. Note that, if the basic type is a pointer (e.g.,
+ <type>const char *</type> in the case of a string), the pointer is only borrowed and the contents must
+ be copied if they are to be used after the end of the messages lifetime. Similarly, during the lifetime
+ of such a pointer, the message must not be modified. If <parameter>type</parameter> is
+ <constant>'h'</constant> (UNIX file descriptor), the descriptor is not duplicated by this call and the
+ returned descriptor remains in possession of the message object, and needs to be duplicated by the caller
+ in order to keep an open reference to it after the message object is freed (for example by calling
+ <literal>fcntl(fd, FD_DUPFD_CLOEXEC, 3)</literal>). See the table below for a complete list of
+ allowed types.
</para>
<table id='format-specifiers'>