aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-10-06 19:15:57 +0200
committerLennart Poettering <lennart@poettering.net>2018-11-09 17:09:52 +0100
commiteda0d9a13b39befff42b099cd2833e7efc336687 (patch)
tree95950c4a0ab08aea3b16518b5e2108efdc561174 /man
parentman: document sd_bus_close() + sd_bus_flush() (diff)
downloadsystemd-eda0d9a13b39befff42b099cd2833e7efc336687.tar.gz
systemd-eda0d9a13b39befff42b099cd2833e7efc336687.tar.bz2
systemd-eda0d9a13b39befff42b099cd2833e7efc336687.zip
man: document sd_bus_flush_close_unref()
Diffstat (limited to 'man')
-rw-r--r--man/rules/meson.build9
-rw-r--r--man/sd_bus_new.xml29
2 files changed, 35 insertions, 3 deletions
diff --git a/man/rules/meson.build b/man/rules/meson.build
index 75e366012..059197500 100644
--- a/man/rules/meson.build
+++ b/man/rules/meson.build
@@ -272,7 +272,14 @@ manpages = [
'3',
['sd_bus_negotiate_creds', 'sd_bus_negotiate_timestamp'],
''],
- ['sd_bus_new', '3', ['sd_bus_ref', 'sd_bus_unref', 'sd_bus_unrefp'], ''],
+ ['sd_bus_new',
+ '3',
+ ['sd_bus_flush_close_unref',
+ 'sd_bus_flush_close_unrefp',
+ 'sd_bus_ref',
+ 'sd_bus_unref',
+ 'sd_bus_unrefp'],
+ ''],
['sd_bus_path_encode',
'3',
['sd_bus_path_decode', 'sd_bus_path_decode_many', 'sd_bus_path_encode_many'],
diff --git a/man/sd_bus_new.xml b/man/sd_bus_new.xml
index 59117676f..1bc011d70 100644
--- a/man/sd_bus_new.xml
+++ b/man/sd_bus_new.xml
@@ -23,6 +23,8 @@
<refname>sd_bus_ref</refname>
<refname>sd_bus_unref</refname>
<refname>sd_bus_unrefp</refname>
+ <refname>sd_bus_flush_close_unref</refname>
+ <refname>sd_bus_flush_close_unrefp</refname>
<refpurpose>Create a new bus object and create or destroy references to it</refpurpose>
</refnamediv>
@@ -50,6 +52,16 @@
<funcdef>void <function>sd_bus_unrefp</function></funcdef>
<paramdef>sd_bus **<parameter>busp</parameter></paramdef>
</funcprototype>
+
+ <funcprototype>
+ <funcdef>sd_bus *<function>sd_bus_flush_close_unref</function></funcdef>
+ <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>void <function>sd_bus_flush_close_unrefp</function></funcdef>
+ <paramdef>sd_bus **<parameter>busp</parameter></paramdef>
+ </funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -111,6 +123,18 @@
dereference its argument, which must not be <constant>NULL</constant>, and will
execute no operation if <emphasis>that</emphasis> is <constant>NULL</constant>.
</para>
+
+ <para><function>sd_bus_flush_close_unref()</function> is similar to <function>sd_bus_unref()</function>, but first
+ executes <citerefentry><refentrytitle>sd_bus_flush</refentrytitle><manvolnum>3</manvolnum></citerefentry> as well
+ as <citerefentry><refentrytitle>sd_bus_close</refentrytitle><manvolnum>3</manvolnum></citerefentry>, ensuring that
+ any pending messages are properly flushed out before the reference to the connection is dropped and possibly the
+ object freed. This call is particularly useful immediately before exiting from a program as it ensures that any
+ pending outgoing messages are written out, and unprocessed but queued incoming messages released before the
+ connection is terminated and released.</para>
+
+ <para><function>sd_bus_flush_close_unrefp()</function> is similar to
+ <function>sd_bus_flush_close_unref()</function>, but may be used in GCC's and LLVM's Clean-up Variable Attribute,
+ see above.</para>
</refsect1>
<refsect1>
@@ -123,7 +147,7 @@
<para><function>sd_bus_ref()</function> always returns the argument.
</para>
- <para><function>sd_bus_unref()</function> always returns
+ <para><function>sd_bus_unref()</function> and <function>sd_bus_flush_close_unref()</function> always return
<constant>NULL</constant>.</para>
</refsect1>
@@ -152,7 +176,8 @@
<citerefentry><refentrytitle>sd_bus_default_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_default_system</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd_bus_open_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>sd_bus_open_system</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>sd_bus_open_system</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>sd_bus_close</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>