Skip to content

Commit

Permalink
man/org.freedesktop.systemd1.xml: Clarify the behavior of Subscribe()
Browse files Browse the repository at this point in the history
It was unclear that it was applied to standard signals too, and this
lead to unexpected behavior.

See: systemd#36366
  • Loading branch information
3v1n0 authored and bluca committed Feb 18, 2025
1 parent 89b3d1f commit bd887a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion man/org.freedesktop.systemd1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,12 @@ node /org/freedesktop/systemd1 {

<para><function>Subscribe()</function> enables most bus signals to be sent out. Clients which are
interested in signals need to call this method. Signals are only sent out if at least one client
invoked this method. <function>Unsubscribe()</function> reverts the signal subscription that
invoked this method. Note that this behavior is applied to all the signals that the object
in <constant>/org/freedesktop/systemd1</constant> may emit, including the
D-Bus standard <constant>org.freedesktop.DBus.Properties.PropertiesChanged</constant>
signal and others that do not belong to the <constant>org.freedesktop.systemd1</constant> interface.</para>

<para><function>Unsubscribe()</function> reverts the signal subscription that
<function>Subscribe()</function> implements. It is not necessary to invoke
<function>Unsubscribe()</function> as clients are tracked. Signals are no longer sent out as soon as
all clients which previously asked for <function>Subscribe()</function> either closed their connection
Expand Down

0 comments on commit bd887a7

Please sign in to comment.