diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-06 13:49:44 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-06 18:21:27 +0100 |
commit | b3bb64767abacc5b759255a698c89b3495cd54f4 (patch) | |
tree | 2cb580ed47c8ef2542dfedfb08f26fcb6ec06151 /man/sd_notify.xml | |
parent | 3576dddf2768a362f67a0df063c459df05b9c343 (diff) | |
download | systemd-b3bb64767abacc5b759255a698c89b3495cd54f4.tar.gz |
man: document that sd_notify() is racy in some cases
Diffstat (limited to 'man/sd_notify.xml')
-rw-r--r-- | man/sd_notify.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/man/sd_notify.xml b/man/sd_notify.xml index 6e98041912..4dcefc4baf 100644 --- a/man/sd_notify.xml +++ b/man/sd_notify.xml @@ -268,6 +268,15 @@ <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details.</para> + <para>Note that <function>sd_notify()</function> notifications may be attributed to units correctly only if either + the sending process is still around at the time PID 1 processes the message, or if the sending process is + explicitly runtime-tracked by the service manager. The latter is the case if the service manager originally forked + off the process, i.e. on all processes that match <varname>NotifyAccess=</varname><option>main</option> or + <varname>NotifyAccess=</varname><option>exec</option>. Conversely, if an auxiliary process of the unit sends an + <function>sd_notify()</function> message and immediately exits, the service manager might not be able to properly + attribute the message to the unit, and thus will ignore it, even if + <varname>NotifyAccess=</varname><option>all</option> is set for it.</para> + <para><function>sd_notifyf()</function> is similar to <function>sd_notify()</function> but takes a <function>printf()</function>-like format string plus |