diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-02-23 21:51:02 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-03-01 22:25:42 +0100 |
commit | 7253eaa0fb4520a6c05f93ea8e146b3f90b57c4a (patch) | |
tree | 45efbf364bdfa96fc00ecaceae8c01fef42ec209 /man | |
parent | fd-util: O_DIRECTORY is fine in fd_verify_safe_flags() too (diff) | |
download | systemd-7253eaa0fb4520a6c05f93ea8e146b3f90b57c4a.tar.xz systemd-7253eaa0fb4520a6c05f93ea8e146b3f90b57c4a.zip |
sd-event: make return code of sd_event_get_exit_code() optional
Diffstat (limited to 'man')
-rw-r--r-- | man/sd_event_exit.xml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/man/sd_event_exit.xml b/man/sd_event_exit.xml index ccbd045509..aa3bc29e98 100644 --- a/man/sd_event_exit.xml +++ b/man/sd_event_exit.xml @@ -65,9 +65,11 @@ the exit code stored in the event loop object is updated, but otherwise no further operation is executed.</para> - <para><function>sd_event_get_exit_code()</function> may be used to - query the exit code passed into - <function>sd_event_exit()</function> earlier.</para> + <para><function>sd_event_get_exit_code()</function> may be used to query the exit code passed to an + earlier call of <function>sd_event_exit()</function>. The return parameter <parameter>code</parameter> + may be set to <constant>NULL</constant>, in order to simply check if <function>sd_event_exit()</function> + has been called before (as <function>sd_event_get_exit_code()</function> fails with + <constant>-ENODATA</constant> if that's not the case, see below).</para> <para>While the full positive and negative integer ranges may be used for the exit code, care should be taken not pick exit codes that @@ -122,7 +124,8 @@ <varlistentry> <term><constant>-ENODATA</constant></term> - <listitem><para>The event loop has not been requested to exit yet.</para></listitem> + <listitem><para>Returned by <function>sd_event_get_exit_code()</function> in case the event loop has not + been requested to exit yet.</para></listitem> </varlistentry> </variablelist> |