1SYSTEMD.KILL(5)                  systemd.kill                  SYSTEMD.KILL(5)
2
3
4

NAME

6       systemd.kill - Process killing procedure configuration
7

SYNOPSIS

9       service.service, socket.socket, mount.mount, swap.swap, scope.scope
10

DESCRIPTION

12       Unit configuration files for services, sockets, mount points, swap
13       devices and scopes share a subset of configuration options which define
14       the killing procedure of processes belonging to the unit.
15
16       This man page lists the configuration options shared by these five unit
17       types. See systemd.unit(5) for the common options shared by all unit
18       configuration files, and systemd.service(5), systemd.socket(5),
19       systemd.swap(5), systemd.mount(5) and systemd.scope(5) for more
20       information on the configuration file options specific to each unit
21       type.
22
23       The kill procedure configuration options are configured in the
24       [Service], [Socket], [Mount] or [Swap] section, depending on the unit
25       type.
26

OPTIONS

28       KillMode=
29           Specifies how processes of this unit shall be killed. One of
30           control-group, process, mixed, none.
31
32           If set to control-group, all remaining processes in the control
33           group of this unit will be killed on unit stop (for services: after
34           the stop command is executed, as configured with ExecStop=). If set
35           to process, only the main process itself is killed. If set to
36           mixed, the SIGTERM signal (see below) is sent to the main process
37           while the subsequent SIGKILL signal (see below) is sent to all
38           remaining processes of the unit's control group. If set to none, no
39           process is killed. In this case, only the stop command will be
40           executed on unit stop, but no process will be killed otherwise.
41           Processes remaining alive after stop are left in their control
42           group and the control group continues to exist after stop unless it
43           is empty.
44
45           Processes will first be terminated via SIGTERM (unless the signal
46           to send is changed via KillSignal= or RestartKillSignal=).
47           Optionally, this is immediately followed by a SIGHUP (if enabled
48           with SendSIGHUP=). If processes still remain after the main process
49           of a unit has exited or the delay configured via the
50           TimeoutStopSec= has passed, the termination request is repeated
51           with the SIGKILL signal or the signal specified via
52           FinalKillSignal= (unless this is disabled via the SendSIGKILL=
53           option). See kill(2) for more information.
54
55           Defaults to control-group.
56
57       KillSignal=
58           Specifies which signal to use when stopping a service. This
59           controls the signal that is sent as first step of shutting down a
60           unit (see above), and is usually followed by SIGKILL (see above and
61           below). For a list of valid signals, see signal(7). Defaults to
62           SIGTERM.
63
64           Note that, right after sending the signal specified in this
65           setting, systemd will always send SIGCONT, to ensure that even
66           suspended tasks can be terminated cleanly.
67
68       RestartKillSignal=
69           Specifies which signal to use when restarting a service. The same
70           as KillSignal= described above, with the exception that this
71           setting is used in a restart job. Not set by default, and the value
72           of KillSignal= is used.
73
74       SendSIGHUP=
75           Specifies whether to send SIGHUP to remaining processes immediately
76           after sending the signal configured with KillSignal=. This is
77           useful to indicate to shells and shell-like programs that their
78           connection has been severed. Takes a boolean value. Defaults to
79           "no".
80
81       SendSIGKILL=
82           Specifies whether to send SIGKILL (or the signal specified by
83           FinalKillSignal=) to remaining processes after a timeout, if the
84           normal shutdown procedure left processes of the service around.
85           When disabled, a KillMode= of control-group or mixed service will
86           not restart if processes from prior services exist within the
87           control group. Takes a boolean value. Defaults to "yes".
88
89       FinalKillSignal=
90           Specifies which signal to send to remaining processes after a
91           timeout if SendSIGKILL= is enabled. The signal configured here
92           should be one that is not typically caught and processed by
93           services (SIGTERM is not suitable). Developers can find it useful
94           to use this to generate a coredump to troubleshoot why a service
95           did not terminate upon receiving the initial SIGTERM signal. This
96           can be achieved by configuring LimitCORE= and setting
97           FinalKillSignal= to either SIGQUIT or SIGABRT Defaults to SIGKILL.
98
99       WatchdogSignal=
100           Specifies which signal to use to terminate the service when the
101           watchdog timeout expires (enabled through WatchdogSec=). Defaults
102           to SIGABRT.
103

SEE ALSO

105       systemd(1), systemctl(1), journalctl(1), systemd.unit(5),
106       systemd.service(5), systemd.socket(5), systemd.swap(5),
107       systemd.mount(5), systemd.exec(5), systemd.directives(7), kill(2),
108       signal(7)
109
110
111
112systemd 245                                                    SYSTEMD.KILL(5)
Impressum