man: document that KillMode=none is a bad idea

This commit is contained in:
Lennart Poettering 2020-05-26 14:08:09 +02:00
parent d068765b68
commit 9b52e0d81a
1 changed files with 17 additions and 20 deletions

View File

@ -61,28 +61,25 @@
<varlistentry> <varlistentry>
<term><varname>KillMode=</varname></term> <term><varname>KillMode=</varname></term>
<listitem><para>Specifies how processes of this unit shall be <listitem><para>Specifies how processes of this unit shall be killed. One of
killed. One of <option>control-group</option>, <option>mixed</option>, <option>process</option>,
<option>control-group</option>,
<option>process</option>,
<option>mixed</option>,
<option>none</option>.</para> <option>none</option>.</para>
<para>If set to <option>control-group</option>, all remaining <para>If set to <option>control-group</option>, all remaining processes in the control group of this
processes in the control group of this unit will be killed on unit will be killed on unit stop (for services: after the stop command is executed, as configured
unit stop (for services: after the stop command is executed, with <varname>ExecStop=</varname>). If set to <option>mixed</option>, the
as configured with <varname>ExecStop=</varname>). If set to <constant>SIGTERM</constant> signal (see below) is sent to the main process while the subsequent
<option>process</option>, only the main process itself is <constant>SIGKILL</constant> signal (see below) is sent to all remaining processes of the unit's
killed. If set to <option>mixed</option>, the control group. If set to <option>process</option>, only the main process itself is killed (not
<constant>SIGTERM</constant> signal (see below) is sent to the recommended!). If set to <option>none</option>, no process is killed (strongly recommended
main process while the subsequent <constant>SIGKILL</constant> against!). In this case, only the stop command will be executed on unit stop, but no process will be
signal (see below) is sent to all remaining processes of the killed otherwise. Processes remaining alive after stop are left in their control group and the
unit's control group. If set to <option>none</option>, no control group continues to exist after stop unless empty.</para>
process is killed. In this case, only the stop command will be
executed on unit stop, but no process will be killed otherwise. <para>Note that it is not recommended to set <varname>KillMode=</varname> to
Processes remaining alive after stop are left in their control <constant>process</constant> or even <constant>none</constant>, as this allows processes to escape
group and the control group continues to exist after stop the service manager's lifecycle and resource management, and to remain running even while their
unless it is empty.</para> service is considered stopped and is assumed to not consume any resources.</para>
<para>Processes will first be terminated via <constant>SIGTERM</constant> (unless the signal to send <para>Processes will first be terminated via <constant>SIGTERM</constant> (unless the signal to send
is changed via <varname>KillSignal=</varname> or <varname>RestartKillSignal=</varname>). Optionally, is changed via <varname>KillSignal=</varname> or <varname>RestartKillSignal=</varname>). Optionally,