]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: clarify sd_bus_default 27357/head
authorLuca Boccassi <bluca@debian.org>
Sat, 22 Apr 2023 11:47:20 +0000 (12:47 +0100)
committerLuca Boccassi <bluca@debian.org>
Sat, 22 Apr 2023 16:41:17 +0000 (17:41 +0100)
It picks the bus based on the cgroup slice.

man/sd_bus_default.xml

index 48d9c9a1082f6bbcbb5b11d2aa9e5e6ece0588b5..8be4254be116f1b31fbd1a5cf6d8d09d5bbc361e 100644 (file)
     <title>Description</title>
 
     <para><function>sd_bus_default()</function> acquires a bus
-    connection object to the user bus when invoked in user context, or
-    to the system bus otherwise. The connection object is associated
-    with the calling thread. Each time the function is invoked from
-    the same thread, the same object is returned, but its reference
-    count is increased by one, as long as at least one reference is
-    kept. When the last reference to the connection is dropped (using
-    the
+    connection object to the user bus when invoked from within a user
+    slice (any session under <literal>user-*.slice</literal>, e.g.:
+    <literal>user@1000.service</literal>), or to the system bus
+    otherwise. The connection object is associated with the calling
+    thread. Each time the function is invoked from the same thread,
+    the same object is returned, but its reference count is increased
+    by one, as long as at least one reference is kept. When the last
+    reference to the connection is dropped (using the
     <citerefentry><refentrytitle>sd_bus_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     call), the connection is terminated. Note that the connection is
     not automatically terminated when the associated thread ends. It