ryantimwilson / rpms / systemd

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