systemd.kill.5 4.44 KB
Newer Older
Michael Biebl's avatar
Michael Biebl committed
1
'\" t
Michael Biebl's avatar
Michael Biebl committed
2
.TH "SYSTEMD\&.KILL" "5" "" "systemd 215" "systemd.kill"
Michael Biebl's avatar
Michael Biebl committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
23
systemd.kill \- Process killing procedure configuration
Michael Biebl's avatar
Michael Biebl committed
24 25 26 27 28
.SH "SYNOPSIS"
.PP
\fIservice\fR\&.service,
\fIsocket\fR\&.socket,
\fImount\fR\&.mount,
29 30
\fIswap\fR\&.swap,
\fIscope\fR\&.scope
Michael Biebl's avatar
Michael Biebl committed
31 32
.SH "DESCRIPTION"
.PP
33
Unit configuration files for services, sockets, mount points, swap devices and scopes share a subset of configuration options which define the killing procedure of processes belonging to the unit\&.
Michael Biebl's avatar
Michael Biebl committed
34
.PP
35
This man page lists the configuration options shared by these five unit types\&. See
Michael Biebl's avatar
Michael Biebl committed
36
\fBsystemd.unit\fR(5)
37
for the common options shared by all unit configuration files, and
Michael Biebl's avatar
Michael Biebl committed
38 39
\fBsystemd.service\fR(5),
\fBsystemd.socket\fR(5),
40
\fBsystemd.swap\fR(5),
Michael Biebl's avatar
Michael Biebl committed
41
\fBsystemd.mount\fR(5)
42 43 44 45 46
and
\fBsystemd.scope\fR(5)
for more information on the configuration file options specific to each unit type\&.
.PP
The kill procedure configuration options are configured in the [Service], [Socket], [Mount] or [Swap] section, depending on the unit type\&.
Michael Biebl's avatar
Michael Biebl committed
47 48 49 50
.SH "OPTIONS"
.PP
\fIKillMode=\fR
.RS 4
51
Specifies how processes of this unit shall be killed\&. One of
Michael Biebl's avatar
Michael Biebl committed
52 53
\fBcontrol\-group\fR,
\fBprocess\fR,
54
\fBmixed\fR,
Michael Biebl's avatar
Michael Biebl committed
55 56 57
\fBnone\fR\&.
.sp
If set to
58
\fBcontrol\-group\fR, 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
Michael Biebl's avatar
Michael Biebl committed
59 60
\fIExecStop=\fR)\&. If set to
\fBprocess\fR, only the main process itself is killed\&. If set to
61 62 63 64 65 66
\fBmixed\fR, the
\fBSIGTERM\fR
signal (see below) is sent to the main process while the subsequent
\fBSIGKILL\fR
signal (see below) is sent to all remaining processes of the unit\*(Aqs control group\&. If set to
\fBnone\fR, 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\&.
Michael Biebl's avatar
Michael Biebl committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
.sp
Processes will first be terminated via
\fBSIGTERM\fR
(unless the signal to send is changed via
\fIKillSignal=\fR)\&. Optionally, this is immediately followed by a
\fBSIGHUP\fR
(if enabled with
\fISendSIGHUP=\fR)\&. If then, after a delay (configured via the
\fITimeoutStopSec=\fR
option), processes still remain, the termination request is repeated with the
\fBSIGKILL\fR
signal (unless this is disabled via the
\fISendSIGKILL=\fR
option)\&. See
\fBkill\fR(2)
for more information\&.
83 84 85
.sp
Defaults to
\fBcontrol\-group\fR\&.
Michael Biebl's avatar
Michael Biebl committed
86 87 88 89
.RE
.PP
\fIKillSignal=\fR
.RS 4
90 91 92 93
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
\fBSIGKILL\fR
(see above and below)\&. For a list of valid signals, see
\fBsignal\fR(7)\&. Defaults to
Michael Biebl's avatar
Michael Biebl committed
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
\fBSIGTERM\fR\&.
.RE
.PP
\fISendSIGHUP=\fR
.RS 4
Specifies whether to send
\fBSIGHUP\fR
to remaining processes immediately after sending the signal configured with
\fIKillSignal=\fR\&. This is useful to indicate to shells and shell\-like programs that their connection has been severed\&. Takes a boolean value\&. Defaults to "no"\&.
.RE
.PP
\fISendSIGKILL=\fR
.RS 4
Specifies whether to send
\fBSIGKILL\fR
to remaining processes after a timeout, if the normal shutdown procedure left processes of the service around\&. Takes a boolean value\&. Defaults to "yes"\&.
.RE
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsystemctl\fR(8),
\fBjournalctl\fR(8),
\fBsystemd.unit\fR(5),
\fBsystemd.service\fR(5),
\fBsystemd.socket\fR(5),
\fBsystemd.swap\fR(5),
\fBsystemd.mount\fR(5),
\fBsystemd.exec\fR(5),
122 123 124
\fBsystemd.directives\fR(7),
\fBkill\fR(2),
\fBsignal\fR(7)