summaryrefslogtreecommitdiffstats
path: root/man/systemd.service.xml
diff options
context:
space:
mode:
authorAndrew Sayers <andrew-github.com@pileofstuff.org>2024-01-09 13:41:29 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-01-24 18:00:53 +0100
commitcd752b25903a82409942ffff54f5b82e7ddea521 (patch)
tree7e322a2c67f84878bcc31c58d5c51c3e76469f67 /man/systemd.service.xml
parentRemove a few references to dracut (diff)
downloadsystemd-cd752b25903a82409942ffff54f5b82e7ddea521.tar.xz
systemd-cd752b25903a82409942ffff54f5b82e7ddea521.zip
Make RestartPreventExitStatus= documentation resemble SuccessExitStatus=
The documentation for `RestartPreventExitStatus=` differs from that for `SuccessExitStatus=` in ways that are sometimes confusing (e.g. using `numeric exit codes` instead of `numeric termination statuses`), and other times plain incorrect (e.g. not mentioning `termination status names`, which I've just confirmed to work in systemd 255). This patch modifies the documentation to be as similar as possible, so as to reduce the reader's cognitive load.
Diffstat (limited to 'man/systemd.service.xml')
-rw-r--r--man/systemd.service.xml22
1 files changed, 14 insertions, 8 deletions
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 47fbe53fcd..74c22260bc 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -1013,16 +1013,22 @@
<listitem><para>Takes a list of exit status definitions that, when returned by the main service
process, will prevent automatic service restarts, regardless of the restart setting configured with
- <varname>Restart=</varname>. Exit status definitions can either be numeric exit codes or termination
- signal names, and are separated by spaces. Defaults to the empty list, so that, by default, no exit
- status is excluded from the configured restart logic. For example:
+ <varname>Restart=</varname>. Exit status definitions can be numeric termination statuses, termination
+ status names, or termination signal names, separated by spaces. Defaults to the empty list, so that,
+ by default, no exit status is excluded from the configured restart logic.
- <programlisting>RestartPreventExitStatus=1 6 SIGABRT</programlisting>
+ <example>
+ <title>A service with the <varname>RestartPreventExitStatus=</varname> setting</title>
+
+ <programlisting>RestartPreventExitStatus=TEMPFAIL 250 SIGKILL</programlisting>
+
+ <para>Exit status 75 (<constant>TEMPFAIL</constant>), 250, and the termination signal
+ <constant>SIGKILL</constant> will not result in automatic service restarting.</para>
+ </example>
- ensures that exit codes 1 and 6 and the termination signal <constant>SIGABRT</constant> will not
- result in automatic service restarting. This option may appear more than once, in which case the list
- of restart-preventing statuses is merged. If the empty string is assigned to this option, the list is
- reset and all prior assignments of this option will have no effect.</para>
+ This option may appear more than once, in which case the list of restart-preventing statuses is merged.
+ If the empty string is assigned to this option, the list is reset and all prior assignments of this
+ option will have no effect.</para>
<para>Note that this setting has no effect on processes configured via
<varname>ExecStartPre=</varname>, <varname>ExecStartPost=</varname>, <varname>ExecStop=</varname>,