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

SEE ALSO

111       systemd(1), systemctl(1), journalctl(1), systemd.unit(5),
112       systemd.service(5), systemd.socket(5), systemd.swap(5),
113       systemd.mount(5), systemd.exec(5), systemd.directives(7), kill(2),
114       signal(7)
115
116
117
118systemd 248                                                    SYSTEMD.KILL(5)
Impressum