ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
572a44
From a49c79e807843bbd87961b3d4b81ea79076c043e Mon Sep 17 00:00:00 2001
572a44
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
572a44
Date: Fri, 27 Dec 2013 15:27:24 -0500
572a44
Subject: [PATCH] man: add a note about propagating signals
572a44
572a44
---
572a44
 man/systemd.service.xml | 39 +++++++++++++++++++++++++--------------
572a44
 1 file changed, 25 insertions(+), 14 deletions(-)
572a44
572a44
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
572a44
index 71bcfb4..af3e0f2 100644
572a44
--- a/man/systemd.service.xml
572a44
+++ b/man/systemd.service.xml
572a44
@@ -734,22 +734,33 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}
572a44
                                 considered successful termination, in
572a44
                                 addition to the normal successful exit
572a44
                                 code 0 and the signals <constant>SIGHUP</constant>, <constant>SIGINT</constant>,
572a44
-                                <constant>SIGTERM</constant> and <constant>SIGPIPE</constant>. Exit status
572a44
+                                <constant>SIGTERM</constant>, and <constant>SIGPIPE</constant>. Exit status
572a44
                                 definitions can either be numeric exit
572a44
                                 codes or termination signal names,
572a44
-                                separated by spaces. Example:
572a44
-                                <literal>SuccessExitStatus=1 2 8
572a44
-                                <constant>SIGKILL</constant></literal>, ensures that exit
572a44
-                                codes 1, 2, 8 and the termination
572a44
-                                signal <constant>SIGKILL</constant> are considered clean
572a44
-                                service terminations. This option may
572a44
-                                appear more than once in which case
572a44
-                                the list of successful exit statuses
572a44
-                                is merged. If the empty string is
572a44
-                                assigned to this option, the list is
572a44
-                                reset, all prior assignments of this
572a44
-                                option will have no
572a44
-                                effect.</para></listitem>
572a44
+                                separated by spaces. For example:
572a44
+				<programlisting>SuccessExitStatus=1 2 8 <constant>SIGKILL</constant></programlisting>
572a44
+				ensures that exit codes 1, 2, 8 and
572a44
+				the termination signal
572a44
+				<constant>SIGKILL</constant> are
572a44
+				considered clean service terminations.
572a44
+			        </para>
572a44
+
572a44
+				<para>Note that if a process has a
572a44
+				signal handler installed and exits by
572a44
+				calling
572a44
+				<citerefentry><refentrytitle>_exit</refentrytitle><manvolnum>2</manvolnum></citerefentry>
572a44
+				in response to a signal, the
572a44
+				information about the signal is lost.
572a44
+				Programs should instead perform cleanup and kill themselves with the same signal instead. See
572a44
+				<ulink url="http://www.cons.org/cracauer/sigint.html">Proper handling of SIGINT/SIGQUIT — How to be a proper program</ulink>.</para>
572a44
+
572a44
+				<para>This option may appear more than once
572a44
+				in which case the list of successful
572a44
+				exit statuses is merged. If the empty
572a44
+				string is assigned to this option, the
572a44
+				list is reset, all prior assignments
572a44
+				of this option will have no
572a44
+				effect.</para></listitem>
572a44
                         </varlistentry>
572a44
 
572a44
                         <varlistentry>