diff options
author | Simon Fowler <simon.fowler@anu.edu.au> | 2024-04-23 06:27:58 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-04-23 17:03:01 +0200 |
commit | 557c04a382e3ed77d965c79b7b5d74ce78fc1a9c (patch) | |
tree | 2aac5ba0edcf0b134a284e36b39b4cbbec313f9a /man/sd_notify.xml | |
parent | sysext: do not return 0 if `unmerge()` fails in the `refresh()` function. (diff) | |
download | systemd-557c04a382e3ed77d965c79b7b5d74ce78fc1a9c.tar.xz systemd-557c04a382e3ed77d965c79b7b5d74ce78fc1a9c.zip |
Add self-contained Python sd_notify example.
This complements the existing C example.
Diffstat (limited to 'man/sd_notify.xml')
-rw-r--r-- | man/sd_notify.xml | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/man/sd_notify.xml b/man/sd_notify.xml index e1c4073e7f..c6490d370c 100644 --- a/man/sd_notify.xml +++ b/man/sd_notify.xml @@ -494,10 +494,20 @@ the guest might try to send malicious notifications to the host, driving it to make destructive decisions based on them.</para> - <para>Note that, while using this library should be preferred in order to avoid code duplication, it is - also possible to reimplement the simple readiness notification protocol without external dependencies, - as demonstrated in the following self-contained example: - <programlisting><xi:include href="notify-selfcontained-example.c" parse="text"/></programlisting></para> + <refsect2> + <title>Standalone Implementations</title> + <para>Note that, while using this library should be preferred in order to avoid code duplication, it is + also possible to reimplement the simple readiness notification protocol without external dependencies, + as demonstrated in the following self-contained examples from several languages:</para> + <refsect3> + <title>C</title> + <programlisting><xi:include href="notify-selfcontained-example.c" parse="text"/></programlisting> + </refsect3> + <refsect3> + <title>Python</title> + <programlisting><xi:include href="notify-selfcontained-example.py" parse="text"/></programlisting> + </refsect3> + </refsect2> </refsect1> <refsect1> |