|
|
698723 |
From 102f4ff97a24c2ddaf6e569c678a0a713f972863 Mon Sep 17 00:00:00 2001
|
|
|
698723 |
From: David Tardon <dtardon@redhat.com>
|
|
|
698723 |
Date: Fri, 19 Mar 2021 10:05:47 +0100
|
|
|
698723 |
Subject: [PATCH] man: document differences in clean exit status for
|
|
|
698723 |
Type=oneshot
|
|
|
698723 |
|
|
|
698723 |
See commit 1f0958f640b87175cd547c1e69084cfe54a22e9d .
|
|
|
698723 |
|
|
|
698723 |
(cherry picked from commit f055cf77862bc580f3afbfaac161d1c060f39411)
|
|
|
698723 |
|
|
|
698723 |
Resolves: #1940078
|
|
|
698723 |
---
|
|
|
698723 |
man/systemd.service.xml | 24 +++++++++++++++---------
|
|
|
698723 |
1 file changed, 15 insertions(+), 9 deletions(-)
|
|
|
698723 |
|
|
|
698723 |
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
|
|
|
698723 |
index 54586d1948..1e30a564df 100644
|
|
|
698723 |
--- a/man/systemd.service.xml
|
|
|
698723 |
+++ b/man/systemd.service.xml
|
|
|
698723 |
@@ -669,14 +669,19 @@
|
|
|
698723 |
If set to <option>no</option> (the default), the service will
|
|
|
698723 |
not be restarted. If set to <option>on-success</option>, it
|
|
|
698723 |
will be restarted only when the service process exits cleanly.
|
|
|
698723 |
- In this context, a clean exit means an exit code of 0, or one
|
|
|
698723 |
- of the signals
|
|
|
698723 |
- <constant>SIGHUP</constant>,
|
|
|
698723 |
- <constant>SIGINT</constant>,
|
|
|
698723 |
- <constant>SIGTERM</constant> or
|
|
|
698723 |
- <constant>SIGPIPE</constant>, and
|
|
|
698723 |
- additionally, exit statuses and signals specified in
|
|
|
698723 |
- <varname>SuccessExitStatus=</varname>. If set to
|
|
|
698723 |
+ In this context, a clean exit means any of the following:
|
|
|
698723 |
+ <itemizedlist>
|
|
|
698723 |
+ <listitem><simpara>exit code of 0;</simpara></listitem>
|
|
|
698723 |
+ <listitem><simpara>for types other than
|
|
|
698723 |
+ <varname>Type=oneshot</varname>, one of the signals
|
|
|
698723 |
+ <constant>SIGHUP</constant>,
|
|
|
698723 |
+ <constant>SIGINT</constant>,
|
|
|
698723 |
+ <constant>SIGTERM</constant>, or
|
|
|
698723 |
+ <constant>SIGPIPE</constant>;</simpara></listitem>
|
|
|
698723 |
+ <listitem><simpara>exit statuses and signals specified in
|
|
|
698723 |
+ <varname>SuccessExitStatus=</varname>.</simpara></listitem>
|
|
|
698723 |
+ </itemizedlist>
|
|
|
698723 |
+ If set to
|
|
|
698723 |
<option>on-failure</option>, the service will be restarted
|
|
|
698723 |
when the process exits with a non-zero exit code, is
|
|
|
698723 |
terminated by a signal (including on core dump, but excluding
|
|
|
698723 |
@@ -798,7 +803,8 @@
|
|
|
698723 |
<listitem><para>Takes a list of exit status definitions that,
|
|
|
698723 |
when returned by the main service process, will be considered
|
|
|
698723 |
successful termination, in addition to the normal successful
|
|
|
698723 |
- exit code 0 and the signals <constant>SIGHUP</constant>,
|
|
|
698723 |
+ exit code 0 and, except for <varname>Type=oneshot</varname>,
|
|
|
698723 |
+ the signals <constant>SIGHUP</constant>,
|
|
|
698723 |
<constant>SIGINT</constant>, <constant>SIGTERM</constant>, and
|
|
|
698723 |
<constant>SIGPIPE</constant>. Exit status definitions can
|
|
|
698723 |
either be numeric exit codes or termination signal names,
|