From: Andrew Sayers Date: Tue, 9 Jan 2024 12:41:29 +0000 (+0000) Subject: Make RestartPreventExitStatus= documentation resemble SuccessExitStatus= X-Git-Tag: v256-rc1~1051 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd752b25903a82409942ffff54f5b82e7ddea521;p=thirdparty%2Fsystemd.git 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. --- diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 47fbe53fcd1..74c22260bc5 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -1013,16 +1013,22 @@ 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 - Restart=. 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: + Restart=. 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. - RestartPreventExitStatus=1 6 SIGABRT + + A service with the <varname>RestartPreventExitStatus=</varname> setting + + RestartPreventExitStatus=TEMPFAIL 250 SIGKILL + + Exit status 75 (TEMPFAIL), 250, and the termination signal + SIGKILL will not result in automatic service restarting. + - ensures that exit codes 1 and 6 and the termination signal SIGABRT 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. + 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. Note that this setting has no effect on processes configured via ExecStartPre=, ExecStartPost=, ExecStop=,