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