]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: document differences in clean exit status for Type=oneshot
authorDavid Tardon <dtardon@redhat.com>
Fri, 19 Mar 2021 09:05:47 +0000 (10:05 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 23 Mar 2021 08:33:23 +0000 (09:33 +0100)
See commit 1f0958f640b87175cd547c1e69084cfe54a22e9d .

man/systemd.service.xml

index 501da54b8aa54e36fc9ba5c1f39272c69bd74662..350bc5f8e5bca5054c2702ed046ab9bfbe2d65f4 100644 (file)
         If set to <option>no</option> (the default), the service will
         not be restarted. If set to <option>on-success</option>, it
         will be restarted only when the service process exits cleanly.
-        In this context, a clean exit means an exit code of 0, or one
-        of the signals
-        <constant>SIGHUP</constant>,
-        <constant>SIGINT</constant>,
-        <constant>SIGTERM</constant> or
-        <constant>SIGPIPE</constant>, and
-        additionally, exit statuses and signals specified in
-        <varname>SuccessExitStatus=</varname>. If set to
+        In this context, a clean exit means any of the following:
+        <itemizedlist>
+            <listitem><simpara>exit code of 0;</simpara></listitem>
+            <listitem><simpara>for types other than
+            <varname>Type=oneshot</varname>, one of the signals
+                <constant>SIGHUP</constant>,
+                <constant>SIGINT</constant>,
+                <constant>SIGTERM</constant>, or
+                <constant>SIGPIPE</constant>;</simpara></listitem>
+            <listitem><simpara>exit statuses and signals specified in
+                <varname>SuccessExitStatus=</varname>.</simpara></listitem>
+        </itemizedlist>
+        If set to
         <option>on-failure</option>, the service will be restarted
         when the process exits with a non-zero exit code, is
         terminated by a signal (including on core dump, but excluding
 
         <listitem><para>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 status
-        0 and the signals <constant>SIGHUP</constant>, <constant>SIGINT</constant>,
+        0 and, except for <varname>Type=oneshot</varname>, the signals <constant>SIGHUP</constant>, <constant>SIGINT</constant>,
         <constant>SIGTERM</constant>, and <constant>SIGPIPE</constant>. Exit status definitions can be
         numeric termination statuses, termination status names, or termination signal names, separated by
         spaces. See the Process Exit Codes section in