]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/systemd.kill.xml
man: fix link markup
[thirdparty/systemd.git] / man / systemd.kill.xml
index 1b4a4a84a0dedaaefd839b9bae5bbf36b8f897dc..73f61c80e4fdf28c5c9a5bf9f2a3556b8f334e9c 100644 (file)
@@ -1,10 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-
-<!--
-  SPDX-License-Identifier: LGPL-2.1+
--->
+<!-- SPDX-License-Identifier: LGPL-2.1+ -->
 
 <refentry id="systemd.kill">
   <refentryinfo>
 
       <varlistentry>
         <term><varname>KillMode=</varname></term>
-        <listitem><para>Specifies how processes of this unit shall be
-        killed. One of
-        <option>control-group</option>,
-        <option>process</option>,
-        <option>mixed</option>,
+        <listitem><para>Specifies how processes of this unit shall be killed. One of
+        <option>control-group</option>, <option>mixed</option>, <option>process</option>,
         <option>none</option>.</para>
 
-        <para>If set to <option>control-group</option>, 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 <varname>ExecStop=</varname>). If set to
-        <option>process</option>, only the main process itself is
-        killed. If set to <option>mixed</option>, the
-        <constant>SIGTERM</constant> signal (see below) is sent to the
-        main process while the subsequent <constant>SIGKILL</constant>
-        signal (see below) is sent to all remaining processes of the
-        unit's control group. If set to <option>none</option>, 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.</para>
-
-        <para>Processes will first be terminated via
-        <constant>SIGTERM</constant> (unless the signal to send is
-        changed via <varname>KillSignal=</varname>). Optionally, this
-        is immediately followed by a <constant>SIGHUP</constant> (if
-        enabled with <varname>SendSIGHUP=</varname>). If then, after a
-        delay (configured via the <varname>TimeoutStopSec=</varname>
-        option), processes still remain, the termination request is
-        repeated with the <constant>SIGKILL</constant> signal or the
-        signal specified via <varname>FinalKillSignal=</varname> (unless
-        this is disabled via the <varname>SendSIGKILL=</varname>
-        option). See
-        <citerefentry><refentrytitle>kill</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+        <para>If set to <option>control-group</option>, 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 <varname>ExecStop=</varname>). If set to <option>mixed</option>, the
+        <constant>SIGTERM</constant> signal (see below) is sent to the main process while the subsequent
+        <constant>SIGKILL</constant> signal (see below) is sent to all remaining processes of the unit's
+        control group. If set to <option>process</option>, only the main process itself is killed (not
+        recommended!). If set to <option>none</option>, no process is killed (strongly recommended
+        against!). In this case, only the stop command will be executed on unit stop, but no process will be
+        killed otherwise.  Processes remaining alive after stop are left in their control group and the
+        control group continues to exist after stop unless empty.</para>
+
+        <para>Note that it is not recommended to set <varname>KillMode=</varname> to
+        <constant>process</constant> or even <constant>none</constant>, as this allows processes to escape
+        the service manager's lifecycle and resource management, and to remain running even while their
+        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
+        is changed via <varname>KillSignal=</varname> or <varname>RestartKillSignal=</varname>). Optionally,
+        this is immediately followed by a <constant>SIGHUP</constant> (if enabled with
+        <varname>SendSIGHUP=</varname>). If processes still remain after the main process of a unit has
+        exited or the delay configured via the <varname>TimeoutStopSec=</varname> has passed, the termination
+        request is repeated with the <constant>SIGKILL</constant> signal or the signal specified via
+        <varname>FinalKillSignal=</varname> (unless this is disabled via the <varname>SendSIGKILL=</varname>
+        option). See <citerefentry><refentrytitle>kill</refentrytitle><manvolnum>2</manvolnum></citerefentry>
         for more information.</para>
 
-        <para>Defaults to
-        <option>control-group</option>.</para></listitem>
+        <para>Defaults to <option>control-group</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><varname>KillSignal=</varname></term>
-        <listitem><para>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 <constant>SIGKILL</constant> (see above and below). For a
-        list of valid signals, see
+        <listitem><para>Specifies which signal to use when stopping a service. This controls the signal that
+        is sent as first step of shutting down a unit (see above), and is usually followed by
+        <constant>SIGKILL</constant> (see above and below). For a list of valid signals, see
         <citerefentry project='man-pages'><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
-        Defaults to <constant>SIGTERM</constant>. </para>
+        Defaults to <constant>SIGTERM</constant>.</para>
 
-        <para>Note that, right after sending the signal specified in
-        this setting, systemd will always send
-        <constant>SIGCONT</constant>, to ensure that even suspended
-        tasks can be terminated cleanly.</para>
+        <para>Note that, right after sending the signal specified in this setting, systemd will always send
+        <constant>SIGCONT</constant>, to ensure that even suspended tasks can be terminated cleanly.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>RestartKillSignal=</varname></term>
+        <listitem><para>Specifies which signal to use when restarting a service. The same as
+        <varname>KillSignal=</varname> described above, with the exception that this setting is used in a
+        restart job. Not set by default, and the value of <varname>KillSignal=</varname> is used.</para>
         </listitem>
       </varlistentry>
 
         <constant>SIGKILL</constant> (or the signal specified by
         <varname>FinalKillSignal=</varname>) to remaining processes
         after a timeout, if the normal shutdown procedure left
-        processes of the service around. Takes a boolean value.
-        Defaults to "yes".
+        processes of the service around. When disabled, a
+        <varname>KillMode=</varname> of <constant>control-group</constant>
+        or <constant>mixed</constant> service will not restart if
+        processes from prior services exist within the control group.
+        Takes a boolean value. Defaults to "yes".
         </para></listitem>
       </varlistentry>
 
         terminate upon receiving the initial <constant>SIGTERM</constant>
         signal. This can be achieved by configuring <varname>LimitCORE=</varname>
         and setting <varname>FinalKillSignal=</varname> to either
-        <constant>SIGQUIT</constant> or <constant>SIGABRT</constant>
+        <constant>SIGQUIT</constant> or <constant>SIGABRT</constant>.
         Defaults to <constant>SIGKILL</constant>.
         </para></listitem>
       </varlistentry>