diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-21 18:44:09 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-10-23 00:17:18 -0400 |
commit | a9becdd65bb4b64675bc0c109d14ab12b1ecd2b7 (patch) | |
tree | 45faa8c9e120afe1e8227926bc238d5e0eeb2920 /man/sd_notify.xml | |
parent | 203af57fcdced5debfc26e1083eaefa031e322f4 (diff) |
sd-daemon,man: ignore missing $WATCHDOG_PID
Systemd 209 started setting $WATCHDOG_PID, and sd-daemon watch was
modified to check for this variable. This means that
sd_watchdog_enabled() stopped working with previous versions of
systemd. But sd-event is a public library and API and we must keep it
working even when a program compiled with a newer version of the
libary is used on a system running an older version of the manager.
getenv() and unsetenv() are fairly expensive calls, so optimize
sd_watchdog_enabled() by not calling them when unnecessary.
man: centralize the description of $WATCHDOG_PID and $WATCHDOG_USEC in
the sd_watchdog_enabled manpage. It is better not to repeat the same
stuff in two places.
Diffstat (limited to 'man/sd_notify.xml')
-rw-r--r-- | man/sd_notify.xml | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/man/sd_notify.xml b/man/sd_notify.xml index fbb882dfd2..35f6f71ab3 100644 --- a/man/sd_notify.xml +++ b/man/sd_notify.xml @@ -192,17 +192,12 @@ <varname>WatchdogSec=</varname> is enabled for it. See <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry> - for details. It is recommended to send - this message if the - <varname>$WATCHDOG_PID</varname> - environment variable has been set to - the PID of the service process, in - every half the time interval that is - specified in the - <varname>$WATCHDOG_USEC</varname> - environment variable. See + for information how to enable this + functionality and <citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry> - for details.</para></listitem> + for the details of how the service can + check if the the watchdog is enabled. + </para></listitem> </varlistentry> </variablelist> |