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