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