systemd/man/systemd.kill.html
2014-11-20 15:28:12 +01:00

136 lines
12 KiB
HTML

<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>
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
visibility: visible;
}
</style><a href="index.html">Index </a>·
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<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
configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>service</code></em>.service</code>,
<code class="filename"><em class="replaceable"><code>socket</code></em>.socket</code>,
<code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code>,
<code class="filename"><em class="replaceable"><code>swap</code></em>.swap</code>,
<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,
mount points, swap devices and scopes share a subset
of configuration options which define the
killing procedure of processes belonging to the unit.</p><p>This man page lists the configuration options
shared by these five unit types. See
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
for the common options shared by all unit
configuration files, and
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a>,
<a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>
and
<a href="systemd.scope.html"><span class="citerefentry"><span class="refentrytitle">systemd.scope</span>(5)</span></a>
for more information on the configuration file options
specific to each unit type.</p><p>The kill procedure
configuration options are configured in the [Service],
[Socket], [Mount] or [Swap] section, depending on the
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
processes of this unit shall be
killed. One of
<code class="option">control-group</code>,
<code class="option">process</code>,
<code class="option">mixed</code>,
<code class="option">none</code>.</p><p>If set to
<code class="option">control-group</code>, all
remaining processes in the control
group of this unit will be killed on
unit stop (for services: after the
stop command is executed, as
configured with
<code class="varname">ExecStop=</code>). If set
to <code class="option">process</code>, only the
main process itself is killed. If set
to <code class="option">mixed</code>, the
<code class="constant">SIGTERM</code> signal
(see below) is sent to the main
process while the subsequent
<code class="constant">SIGKILL</code> signal
(see below) is sent to all remaining
processes of the unit's control
group. If set to
<code class="option">none</code>, no process is
killed. In this case, only the stop
command will be executed on unit stop,
but no process be killed
otherwise. Processes remaining alive
after stop are left in their control
group and the control group continues
to exist after stop unless it is
empty.</p><p>Processes will first be
terminated via
<code class="constant">SIGTERM</code> (unless
the signal to send is changed via
<code class="varname">KillSignal=</code>). Optionally,
this is immediately followed by a
<code class="constant">SIGHUP</code> (if
enabled with
<code class="varname">SendSIGHUP=</code>). If
then, after a delay (configured via the
<code class="varname">TimeoutStopSec=</code> option),
processes still remain, the
termination request is repeated with
the <code class="constant">SIGKILL</code>
signal (unless this is disabled via
the <code class="varname">SendSIGKILL=</code>
option). See
<a href="http://man7.org/linux/man-pages/man2/kill.2.html"><span class="citerefentry"><span class="refentrytitle">kill</span>(2)</span></a>
for more
information.</p><p>Defaults to
<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
to use when killing a service. This
controls the signal that is sent as
first step of shutting down a unit
(see above), and is usually followed
by <code class="constant">SIGKILL</code> (see
above and below). For a list of valid
signals, see
<a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>. Defaults
to <code class="constant">SIGTERM</code>.
</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
send <code class="constant">SIGHUP</code> to
remaining processes immediately after
sending the signal configured with
<code class="varname">KillSignal=</code>. This
is useful to indicate to shells and
shell-like programs that their
connection has been severed. Takes a
boolean value. Defaults to "no".
</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
send <code class="constant">SIGKILL</code> to remaining processes
after a timeout, if the normal
shutdown procedure left processes of
the service around. Takes a boolean
value. Defaults to "yes".
</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>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(8)</span></a>,
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="systemd.swap.html"><span class="citerefentry"><span class="refentrytitle">systemd.swap</span>(5)</span></a>,
<a href="systemd.mount.html"><span class="citerefentry"><span class="refentrytitle">systemd.mount</span>(5)</span></a>,
<a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
<a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/kill.2.html"><span class="citerefentry"><span class="refentrytitle">kill</span>(2)</span></a>,
<a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>
</p></div></div></body></html>