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