valeriyvdovin / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

Blame SOURCES/0165-man-add-a-note-about-propagating-signals.patch

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