1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

man: document differences in clean exit status for Type=oneshot

See commit 1f0958f640 .
This commit is contained in:
David Tardon 2021-03-19 10:05:47 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 3babb81625
commit f055cf7786

View File

@ -756,14 +756,19 @@
If set to <option>no</option> (the default), the service will If set to <option>no</option> (the default), the service will
not be restarted. If set to <option>on-success</option>, it not be restarted. If set to <option>on-success</option>, it
will be restarted only when the service process exits cleanly. will be restarted only when the service process exits cleanly.
In this context, a clean exit means an exit code of 0, or one In this context, a clean exit means any of the following:
of the signals <itemizedlist>
<constant>SIGHUP</constant>, <listitem><simpara>exit code of 0;</simpara></listitem>
<constant>SIGINT</constant>, <listitem><simpara>for types other than
<constant>SIGTERM</constant> or <varname>Type=oneshot</varname>, one of the signals
<constant>SIGPIPE</constant>, and <constant>SIGHUP</constant>,
additionally, exit statuses and signals specified in <constant>SIGINT</constant>,
<varname>SuccessExitStatus=</varname>. If set to <constant>SIGTERM</constant>, or
<constant>SIGPIPE</constant>;</simpara></listitem>
<listitem><simpara>exit statuses and signals specified in
<varname>SuccessExitStatus=</varname>.</simpara></listitem>
</itemizedlist>
If set to
<option>on-failure</option>, the service will be restarted <option>on-failure</option>, the service will be restarted
when the process exits with a non-zero exit code, is when the process exits with a non-zero exit code, is
terminated by a signal (including on core dump, but excluding terminated by a signal (including on core dump, but excluding
@ -885,7 +890,7 @@
<listitem><para>Takes a list of exit status definitions that, when returned by the main service <listitem><para>Takes a list of exit status definitions that, when returned by the main service
process, will be considered successful termination, in addition to the normal successful exit status process, will be considered successful termination, in addition to the normal successful exit status
0 and the signals <constant>SIGHUP</constant>, <constant>SIGINT</constant>, 0 and, except for <varname>Type=oneshot</varname>, the signals <constant>SIGHUP</constant>, <constant>SIGINT</constant>,
<constant>SIGTERM</constant>, and <constant>SIGPIPE</constant>. Exit status definitions can be <constant>SIGTERM</constant>, and <constant>SIGPIPE</constant>. Exit status definitions can be
numeric termination statuses, termination status names, or termination signal names, separated by numeric termination statuses, termination status names, or termination signal names, separated by
spaces. See the Process Exit Codes section in spaces. See the Process Exit Codes section in