]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: document the RestartKillSignal= setting
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 2 Oct 2019 11:53:49 +0000 (13:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 2 Oct 2019 12:01:27 +0000 (14:01 +0200)
man/systemd.kill.xml
man/systemd.service.xml

index 2c6fea7493973b8777a9ca28f44f40a90c6cf93c..6a1c67d4063f8451400c0877cfafcf77619673b9 100644 (file)
         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 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>
+        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>
       </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>
 
index 14840c2e16d80200039145142d82cd6d2a235378..af14eedfcc6fac2b6681da021bf3c149896bcaa7 100644 (file)
 
       <varlistentry>
         <term><varname>ExecStop=</varname></term>
-        <listitem><para>Commands to execute to stop the service
-        started via <varname>ExecStart=</varname>. This argument takes
-        multiple command lines, following the same scheme as described
-        for <varname>ExecStart=</varname> above. Use of this setting
-        is optional. After the commands configured in this option are
-        run, it is implied that the service is stopped, and any processes
-        remaining for it are terminated
-        according to the <varname>KillMode=</varname> setting (see
+        <listitem><para>Commands to execute to stop the service started via
+        <varname>ExecStart=</varname>. This argument takes multiple command lines, following the same scheme
+        as described for <varname>ExecStart=</varname> above. Use of this setting is optional. After the
+        commands configured in this option are run, it is implied that the service is stopped, and any
+        processes remaining for it are terminated according to the <varname>KillMode=</varname> setting (see
         <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
-        If this option is not specified, the process is terminated by
-        sending the signal specified in <varname>KillSignal=</varname>
-        when service stop is requested. Specifier and environment
-        variable substitution is supported (including
+        If this option is not specified, the process is terminated by sending the signal specified in
+        <varname>KillSignal=</varname> or <varname>RestartKillSignal=</varname> when service stop is
+        requested. Specifier and environment variable substitution is supported (including
         <varname>$MAINPID</varname>, see above).</para>
 
-        <para>Note that it is usually not sufficient to specify a command for this setting that only asks the service
-        to terminate (for example, by queuing some form of termination signal for it), but does not wait for it to do
-        so. Since the remaining processes of the services are killed according to <varname>KillMode=</varname> and
-        <varname>KillSignal=</varname> as described above immediately after the command exited, this may not result in
-        a clean stop. The specified command should hence be a synchronous operation, not an asynchronous one.</para>
+        <para>Note that it is usually not sufficient to specify a command for this setting that only asks the
+        service to terminate (for example, by sending some form of termination signal to it), but does not
+        wait for it to do so. Since the remaining processes of the services are killed according to
+        <varname>KillMode=</varname> and <varname>KillSignal=</varname> or
+        <varname>RestartKillSignal=</varname> as described above immediately after the command exited, this
+        may not result in a clean stop. The specified command should hence be a synchronous operation, not an
+        asynchronous one.</para>
 
         <para>Note that the commands specified in <varname>ExecStop=</varname> are only executed when the service
         started successfully first. They are not invoked if the service was never started at all, or in case its