]> git.proxmox.com Git - systemd.git/blame - man/systemd.kill.html
Imported Upstream version 217
[systemd.git] / man / systemd.kill.html
CommitLineData
663996b3
MS
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd.kill</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
2 a.headerlink {
3 color: #c60f0f;
4 font-size: 0.8em;
5 padding: 0 4px 0 4px;
6 text-decoration: none;
7 visibility: hidden;
8 }
9
10 a.headerlink:hover {
11 background-color: #c60f0f;
12 color: white;
13 }
14
15 h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
16 visibility: visible;
17 }
18 </style><a href="index.html">Index </a>·
19 <a href="systemd.directives.html">Directives </a>·
20 <a href="../python-systemd/index.html">Python </a>·
21 <a href="../libudev/index.html">libudev </a>·
5eef597e 22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</span><hr><div class="refentry"><a name="systemd.kill"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.kill — Process killing procedure
60f067b4 23 configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>service</code></em>.service</code>,
663996b3
MS
24 <code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code>,
25 <code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code>,
60f067b4 26 <code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code>,
5eef597e 27 <code class="filename"><em class="replaceable"><code>scope</code></em>.scope</code></p></div><div class="refsect1"><a name="idm214192753776"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>Unit configuration files for services, sockets,
60f067b4
JS
28 mount points, swap devices and scopes share a subset
29 of configuration options which define the
30 killing procedure of processes belonging to the unit.</p><p>This man page lists the configuration options
31 shared by these five unit types. See
663996b3 32 <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
60f067b4
JS
33 for the common options shared by all unit
34 configuration files, and
663996b3
MS
35 <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
36 <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
60f067b4 37 <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a>,
663996b3 38 <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>
60f067b4
JS
39 and
40 <a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a>
41 for more information on the configuration file options
42 specific to each unit type.</p><p>The kill procedure
663996b3 43 configuration options are configured in the [Service],
60f067b4 44 [Socket], [Mount] or [Swap] section, depending on the
5eef597e 45 unit type.</p></div><div class="refsect1"><a name="idm214192746032"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="KillMode="><span class="term"><code class="varname">KillMode=</code></span><a class="headerlink" title="Permalink to this term" href="#KillMode=">¶</a></dt><dd><p>Specifies how
60f067b4 46 processes of this unit shall be
663996b3
MS
47 killed. One of
48 <code class="option">control-group</code>,
49 <code class="option">process</code>,
60f067b4 50 <code class="option">mixed</code>,
663996b3 51 <code class="option">none</code>.</p><p>If set to
14228c0d 52 <code class="option">control-group</code>, all
663996b3 53 remaining processes in the control
60f067b4
JS
54 group of this unit will be killed on
55 unit stop (for services: after the
663996b3
MS
56 stop command is executed, as
57 configured with
58 <code class="varname">ExecStop=</code>). If set
14228c0d 59 to <code class="option">process</code>, only the
663996b3 60 main process itself is killed. If set
60f067b4
JS
61 to <code class="option">mixed</code>, the
62 <code class="constant">SIGTERM</code> signal
63 (see below) is sent to the main
64 process while the subsequent
65 <code class="constant">SIGKILL</code> signal
66 (see below) is sent to all remaining
67 processes of the unit's control
68 group. If set to
69 <code class="option">none</code>, no process is
70 killed. In this case, only the stop
71 command will be executed on unit stop,
72 but no process be killed
663996b3
MS
73 otherwise. Processes remaining alive
74 after stop are left in their control
75 group and the control group continues
76 to exist after stop unless it is
60f067b4 77 empty.</p><p>Processes will first be
14228c0d
MB
78 terminated via
79 <code class="constant">SIGTERM</code> (unless
80 the signal to send is changed via
81 <code class="varname">KillSignal=</code>). Optionally,
82 this is immediately followed by a
83 <code class="constant">SIGHUP</code> (if
84 enabled with
85 <code class="varname">SendSIGHUP=</code>). If
86 then, after a delay (configured via the
87 <code class="varname">TimeoutStopSec=</code> option),
663996b3
MS
88 processes still remain, the
89 termination request is repeated with
14228c0d
MB
90 the <code class="constant">SIGKILL</code>
91 signal (unless this is disabled via
92 the <code class="varname">SendSIGKILL=</code>
663996b3 93 option). See
5eef597e 94 <a href="http://man7.org/linux/man-pages/man2/kill.2.html"><span class="citerefentry"><span class="refentrytitle">kill</span>(2)</span></a>
663996b3 95 for more
60f067b4
JS
96 information.</p><p>Defaults to
97 <code class="option">control-group</code>.</p></dd><dt id="KillSignal="><span class="term"><code class="varname">KillSignal=</code></span><a class="headerlink" title="Permalink to this term" href="#KillSignal=">¶</a></dt><dd><p>Specifies which signal
98 to use when killing a service. This
99 controls the signal that is sent as
100 first step of shutting down a unit
101 (see above), and is usually followed
102 by <code class="constant">SIGKILL</code> (see
103 above and below). For a list of valid
104 signals, see
105 <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>. Defaults
106 to <code class="constant">SIGTERM</code>.
14228c0d
MB
107 </p></dd><dt id="SendSIGHUP="><span class="term"><code class="varname">SendSIGHUP=</code></span><a class="headerlink" title="Permalink to this term" href="#SendSIGHUP=">¶</a></dt><dd><p>Specifies whether to
108 send <code class="constant">SIGHUP</code> to
109 remaining processes immediately after
110 sending the signal configured with
111 <code class="varname">KillSignal=</code>. This
112 is useful to indicate to shells and
113 shell-like programs that their
114 connection has been severed. Takes a
115 boolean value. Defaults to "no".
663996b3 116 </p></dd><dt id="SendSIGKILL="><span class="term"><code class="varname">SendSIGKILL=</code></span><a class="headerlink" title="Permalink to this term" href="#SendSIGKILL=">¶</a></dt><dd><p>Specifies whether to
14228c0d 117 send <code class="constant">SIGKILL</code> to remaining processes
663996b3
MS
118 after a timeout, if the normal
119 shutdown procedure left processes of
120 the service around. Takes a boolean
121 value. Defaults to "yes".
5eef597e 122 </p></dd></dl></div></div><div class="refsect1"><a name="idm214196666000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
663996b3 123 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
5eef597e 124 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
663996b3
MS
125 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(8)</span></a>,
126 <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
127 <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
128 <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
129 <a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a>,
130 <a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>,
131 <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
60f067b4 132 <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>,
5eef597e 133 <a href="http://man7.org/linux/man-pages/man2/kill.2.html"><span class="citerefentry"><span class="refentrytitle">kill</span>(2)</span></a>,
60f067b4 134 <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>
663996b3 135 </p></div></div></body></html>