From 1e0d5eebf1da932a47c8e4c2728c2f008d09abca Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 11 May 2020 10:36:28 +0200 Subject: man: clarify that exit status name mappings are unaffected by SuccessExitStatus= Fixes: #15757 (Note there's quite some confusion regarding "exit status" vs. "exit code" in the docs here. We should clean this up fully one day. This change tries to fix some occasions of the wrong use, but not all.) --- man/systemd.service.xml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'man/systemd.service.xml') diff --git a/man/systemd.service.xml b/man/systemd.service.xml index 86dee3b3f0..0cfd0853c6 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -845,35 +845,41 @@ SuccessExitStatus= + 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 code 0 - and the signals SIGHUP, SIGINT, + process, will be considered successful termination, in addition to the normal successful exit status + 0 and the signals SIGHUP, SIGINT, SIGTERM, and SIGPIPE. Exit status definitions can be - numeric exit codes, termination code names, or termination signal names, separated by spaces. See the - Process Exit Codes section in + numeric termination statuses, termination status names, or termination signal names, separated by + spaces. See the Process Exit Codes section in systemd.exec5 for - a list of termination codes names (for this setting only the part without the - EXIT_ or EX_ prefix should be used). See - signal7 for + a list of termination status names (for this setting only the part without the + EXIT_ or EX_ prefix should be used). See signal7 for a list of signal names. - This option may appear more than once, in which case the - list of successful exit statuses is merged. If the empty - string is assigned to this option, the list is reset, all - prior assignments of this option will have no - effect. + Note that this setting does not change the the mapping between numeric exit statuses and their + names, i.e. regardless how this setting is used 0 will still be mapped to SUCCESS + (and thus typically shown as 0/SUCCESS in tool outputs) and 1 to + FAILURE (and thus typically shown as 1/FAILURE), and so on. It + only controls what happens as effect of these exit statuses, and how it propagates to the state of + the service as a whole. + + This option may appear more than once, in which case the list of successful exit statuses is + merged. If the empty string is assigned to this option, the list is reset, all prior assignments of + this option will have no effect. A service with with the <varname>SuccessExitStatus=</varname> setting SuccessExitStatus=TEMPFAIL 250 SIGUSR1 - Exit codes 75 (TEMPFAIL), 250, and the termination signal + Exit status 75 (TEMPFAIL), 250, and the termination signal SIGKILL are considered clean service terminations. - Note: systemd-analyze exit-status may be used to list exit - codes and translate between numerical code values and names. + Note: systemd-analyze exit-status may be used to list exit statuses and + translate between numerical status values and names. -- cgit v1.2.1