chiark / gitweb /
update TODO
[elogind.git] / man / systemd.kill.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of systemd.
7
8   Copyright 2012 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd.kill">
25   <refentryinfo>
26     <title>systemd.kill</title>
27     <productname>systemd</productname>
28
29     <authorgroup>
30       <author>
31         <contrib>Developer</contrib>
32         <firstname>Lennart</firstname>
33         <surname>Poettering</surname>
34         <email>lennart@poettering.net</email>
35       </author>
36     </authorgroup>
37   </refentryinfo>
38
39   <refmeta>
40     <refentrytitle>systemd.kill</refentrytitle>
41     <manvolnum>5</manvolnum>
42   </refmeta>
43
44   <refnamediv>
45     <refname>systemd.kill</refname>
46     <refpurpose>Process killing procedure
47     configuration</refpurpose>
48   </refnamediv>
49
50   <refsynopsisdiv>
51     <para><filename><replaceable>service</replaceable>.service</filename>,
52     <filename><replaceable>socket</replaceable>.socket</filename>,
53     <filename><replaceable>mount</replaceable>.mount</filename>,
54     <filename><replaceable>swap</replaceable>.swap</filename>,
55     <filename><replaceable>scope</replaceable>.scope</filename></para>
56   </refsynopsisdiv>
57
58   <refsect1>
59     <title>Description</title>
60
61     <para>Unit configuration files for services, sockets, mount
62     points, swap devices and scopes share a subset of configuration
63     options which define the killing procedure of processes belonging
64     to the unit.</para>
65
66     <para>This man page lists the configuration options shared by
67     these five unit types. See
68     <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
69     for the common options shared by all unit configuration files, and
70     <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
71     <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
72     <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
73     <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
74     and
75     <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>
76     for more information on the configuration file options specific to
77     each unit type.</para>
78
79     <para>The kill procedure configuration options are configured in
80     the [Service], [Socket], [Mount] or [Swap] section, depending on
81     the unit type.</para>
82   </refsect1>
83
84   <refsect1>
85     <title>Options</title>
86
87     <variablelist class='unit-directives'>
88
89       <varlistentry>
90         <term><varname>KillMode=</varname></term>
91         <listitem><para>Specifies how processes of this unit shall be
92         killed. One of
93         <option>control-group</option>,
94         <option>process</option>,
95         <option>mixed</option>,
96         <option>none</option>.</para>
97
98         <para>If set to <option>control-group</option>, all remaining
99         processes in the control group of this unit will be killed on
100         unit stop (for services: after the stop command is executed,
101         as configured with <varname>ExecStop=</varname>). If set to
102         <option>process</option>, only the main process itself is
103         killed. If set to <option>mixed</option>, the
104         <constant>SIGTERM</constant> signal (see below) is sent to the
105         main process while the subsequent <constant>SIGKILL</constant>
106         signal (see below) is sent to all remaining processes of the
107         unit's control group. If set to <option>none</option>, no
108         process is killed. In this case, only the stop command will be
109         executed on unit stop, but no process be killed otherwise.
110         Processes remaining alive after stop are left in their control
111         group and the control group continues to exist after stop
112         unless it is empty.</para>
113
114         <para>Processes will first be terminated via
115         <constant>SIGTERM</constant> (unless the signal to send is
116         changed via <varname>KillSignal=</varname>). Optionally, this
117         is immediately followed by a <constant>SIGHUP</constant> (if
118         enabled with <varname>SendSIGHUP=</varname>). If then, after a
119         delay (configured via the <varname>TimeoutStopSec=</varname>
120         option), processes still remain, the termination request is
121         repeated with the <constant>SIGKILL</constant> signal (unless
122         this is disabled via the <varname>SendSIGKILL=</varname>
123         option). See
124         <citerefentry><refentrytitle>kill</refentrytitle><manvolnum>2</manvolnum></citerefentry>
125         for more information.</para>
126
127         <para>Defaults to
128         <option>control-group</option>.</para></listitem>
129       </varlistentry>
130
131       <varlistentry>
132         <term><varname>KillSignal=</varname></term>
133         <listitem><para>Specifies which signal to use when killing a
134         service. This controls the signal that is sent as first step
135         of shutting down a unit (see above), and is usually followed
136         by <constant>SIGKILL</constant> (see above and below). For a
137         list of valid signals, see
138         <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
139         Defaults to <constant>SIGTERM</constant>. </para></listitem>
140       </varlistentry>
141
142       <varlistentry>
143         <term><varname>SendSIGHUP=</varname></term>
144         <listitem><para>Specifies whether to send
145         <constant>SIGHUP</constant> to remaining processes immediately
146         after sending the signal configured with
147         <varname>KillSignal=</varname>. This is useful to indicate to
148         shells and shell-like programs that their connection has been
149         severed. Takes a boolean value. Defaults to "no".
150         </para></listitem>
151       </varlistentry>
152
153       <varlistentry>
154         <term><varname>SendSIGKILL=</varname></term>
155         <listitem><para>Specifies whether to send
156         <constant>SIGKILL</constant> to remaining processes after a
157         timeout, if the normal shutdown procedure left processes of
158         the service around. Takes a boolean value. Defaults to "yes".
159         </para></listitem>
160       </varlistentry>
161
162     </variablelist>
163   </refsect1>
164
165   <refsect1>
166       <title>See Also</title>
167       <para>
168         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
169         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
170         <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
171         <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
172         <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
173         <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
174         <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
175         <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
176         <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
177         <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
178         <citerefentry><refentrytitle>kill</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
179         <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>
180       </para>
181   </refsect1>
182
183 </refentry>