naccyde / rpms / systemd

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