line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of Config-Model-Systemd |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This software is Copyright (c) 2008-2022 by Dominique Dumont. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is free software, licensed under: |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# The GNU Lesser General Public License, Version 2.1, February 1999 |
9
|
|
|
|
|
|
|
# |
10
|
4
|
|
|
4
|
|
29615
|
use strict; |
|
4
|
|
|
1
|
|
9
|
|
|
4
|
|
|
1
|
|
92
|
|
|
1
|
|
|
|
|
4954
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
|
1
|
|
|
|
|
5194
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
19
|
|
11
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
1
|
|
6
|
|
|
4
|
|
|
1
|
|
603
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
127
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
146
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
return [ |
14
|
|
|
|
|
|
|
{ |
15
|
|
|
|
|
|
|
'accept' => [ |
16
|
|
|
|
|
|
|
'.*', |
17
|
|
|
|
|
|
|
{ |
18
|
|
|
|
|
|
|
'type' => 'leaf', |
19
|
|
|
|
|
|
|
'value_type' => 'uniline', |
20
|
|
|
|
|
|
|
'warn' => 'Unexpected systemd parameter. Please contact cme author to update systemd model.' |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
], |
23
|
|
|
|
|
|
|
'class_description' => 'Unit configuration files for services, sockets, mount |
24
|
|
|
|
|
|
|
points, swap devices and scopes share a subset of configuration |
25
|
|
|
|
|
|
|
options which define the killing procedure of processes belonging |
26
|
|
|
|
|
|
|
to the unit. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
This man page lists the configuration options shared by |
29
|
|
|
|
|
|
|
these five unit types. See |
30
|
|
|
|
|
|
|
L<systemd.unit(5)> |
31
|
|
|
|
|
|
|
for the common options shared by all unit configuration files, and |
32
|
|
|
|
|
|
|
L<systemd.service(5)>, |
33
|
|
|
|
|
|
|
L<systemd.socket(5)>, |
34
|
|
|
|
|
|
|
L<systemd.swap(5)>, |
35
|
|
|
|
|
|
|
L<systemd.mount(5)> |
36
|
|
|
|
|
|
|
and |
37
|
|
|
|
|
|
|
L<systemd.scope(5)> |
38
|
|
|
|
|
|
|
for more information on the configuration file options specific to |
39
|
|
|
|
|
|
|
each unit type. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
The kill procedure configuration options are configured in |
42
|
|
|
|
|
|
|
the [Service], [Socket], [Mount] or [Swap] section, depending on |
43
|
|
|
|
|
|
|
the unit type. |
44
|
|
|
|
|
|
|
This configuration class was generated from systemd documentation. |
45
|
|
|
|
|
|
|
by L<parse-man.pl|https://github.com/dod38fr/config-model-systemd/contrib/parse-man.pl> |
46
|
|
|
|
|
|
|
', |
47
|
|
|
|
|
|
|
'copyright' => [ |
48
|
|
|
|
|
|
|
'2010-2016 Lennart Poettering and others', |
49
|
|
|
|
|
|
|
'2016 Dominique Dumont' |
50
|
|
|
|
|
|
|
], |
51
|
|
|
|
|
|
|
'element' => [ |
52
|
|
|
|
|
|
|
'KillMode', |
53
|
|
|
|
|
|
|
{ |
54
|
|
|
|
|
|
|
'description' => 'Specifies how processes of this unit shall be killed. One of |
55
|
|
|
|
|
|
|
C<control-group>, C<mixed>, C<process>, |
56
|
|
|
|
|
|
|
C<none>. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
If set to C<control-group>, all remaining processes in the control group of this |
59
|
|
|
|
|
|
|
unit will be killed on unit stop (for services: after the stop command is executed, as configured |
60
|
|
|
|
|
|
|
with C<ExecStop>). If set to C<mixed>, the |
61
|
|
|
|
|
|
|
C<SIGTERM> signal (see below) is sent to the main process while the subsequent |
62
|
|
|
|
|
|
|
C<SIGKILL> signal (see below) is sent to all remaining processes of the unit\'s |
63
|
|
|
|
|
|
|
control group. If set to C<process>, only the main process itself is killed (not |
64
|
|
|
|
|
|
|
recommended!). If set to C<none>, no process is killed (strongly recommended |
65
|
|
|
|
|
|
|
against!). In this case, only the stop command will be executed on unit stop, but no process will be |
66
|
|
|
|
|
|
|
killed otherwise. Processes remaining alive after stop are left in their control group and the |
67
|
|
|
|
|
|
|
control group continues to exist after stop unless empty. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Note that it is not recommended to set C<KillMode> to |
70
|
|
|
|
|
|
|
C<process> or even C<none>, as this allows processes to escape |
71
|
|
|
|
|
|
|
the service manager\'s lifecycle and resource management, and to remain running even while their |
72
|
|
|
|
|
|
|
service is considered stopped and is assumed to not consume any resources. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Processes will first be terminated via C<SIGTERM> (unless the signal to send |
75
|
|
|
|
|
|
|
is changed via C<KillSignal> or C<RestartKillSignal>). Optionally, |
76
|
|
|
|
|
|
|
this is immediately followed by a C<SIGHUP> (if enabled with |
77
|
|
|
|
|
|
|
C<SendSIGHUP>). If processes still remain after the main process of a unit has |
78
|
|
|
|
|
|
|
exited or the delay configured via the C<TimeoutStopSec> has passed, the termination |
79
|
|
|
|
|
|
|
request is repeated with the C<SIGKILL> signal or the signal specified via |
80
|
|
|
|
|
|
|
C<FinalKillSignal> (unless this is disabled via the C<SendSIGKILL> |
81
|
|
|
|
|
|
|
option). See L<kill(2)> |
82
|
|
|
|
|
|
|
for more information. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Defaults to C<control-group>.', |
85
|
|
|
|
|
|
|
'type' => 'leaf', |
86
|
|
|
|
|
|
|
'value_type' => 'uniline' |
87
|
|
|
|
|
|
|
}, |
88
|
|
|
|
|
|
|
'KillSignal', |
89
|
|
|
|
|
|
|
{ |
90
|
|
|
|
|
|
|
'description' => 'Specifies which signal to use when stopping a service. This controls the signal that |
91
|
|
|
|
|
|
|
is sent as first step of shutting down a unit (see above), and is usually followed by |
92
|
|
|
|
|
|
|
C<SIGKILL> (see above and below). For a list of valid signals, see |
93
|
|
|
|
|
|
|
L<signal(7)>. |
94
|
|
|
|
|
|
|
Defaults to C<SIGTERM>. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Note that, right after sending the signal specified in this setting, systemd will always send |
97
|
|
|
|
|
|
|
C<SIGCONT>, to ensure that even suspended tasks can be terminated cleanly.', |
98
|
|
|
|
|
|
|
'type' => 'leaf', |
99
|
|
|
|
|
|
|
'value_type' => 'uniline' |
100
|
|
|
|
|
|
|
}, |
101
|
|
|
|
|
|
|
'RestartKillSignal', |
102
|
|
|
|
|
|
|
{ |
103
|
|
|
|
|
|
|
'description' => 'Specifies which signal to use when restarting a service. The same as |
104
|
|
|
|
|
|
|
C<KillSignal> described above, with the exception that this setting is used in a |
105
|
|
|
|
|
|
|
restart job. Not set by default, and the value of C<KillSignal> is used.', |
106
|
|
|
|
|
|
|
'type' => 'leaf', |
107
|
|
|
|
|
|
|
'value_type' => 'uniline' |
108
|
|
|
|
|
|
|
}, |
109
|
|
|
|
|
|
|
'SendSIGHUP', |
110
|
|
|
|
|
|
|
{ |
111
|
|
|
|
|
|
|
'description' => 'Specifies whether to send |
112
|
|
|
|
|
|
|
C<SIGHUP> to remaining processes immediately |
113
|
|
|
|
|
|
|
after sending the signal configured with |
114
|
|
|
|
|
|
|
C<KillSignal>. This is useful to indicate to |
115
|
|
|
|
|
|
|
shells and shell-like programs that their connection has been |
116
|
|
|
|
|
|
|
severed. Takes a boolean value. Defaults to "no". |
117
|
|
|
|
|
|
|
', |
118
|
|
|
|
|
|
|
'type' => 'leaf', |
119
|
|
|
|
|
|
|
'value_type' => 'boolean', |
120
|
|
|
|
|
|
|
'write_as' => [ |
121
|
|
|
|
|
|
|
'no', |
122
|
|
|
|
|
|
|
'yes' |
123
|
|
|
|
|
|
|
] |
124
|
|
|
|
|
|
|
}, |
125
|
|
|
|
|
|
|
'SendSIGKILL', |
126
|
|
|
|
|
|
|
{ |
127
|
|
|
|
|
|
|
'description' => 'Specifies whether to send |
128
|
|
|
|
|
|
|
C<SIGKILL> (or the signal specified by |
129
|
|
|
|
|
|
|
C<FinalKillSignal>) to remaining processes |
130
|
|
|
|
|
|
|
after a timeout, if the normal shutdown procedure left |
131
|
|
|
|
|
|
|
processes of the service around. When disabled, a |
132
|
|
|
|
|
|
|
C<KillMode> of C<control-group> |
133
|
|
|
|
|
|
|
or C<mixed> service will not restart if |
134
|
|
|
|
|
|
|
processes from prior services exist within the control group. |
135
|
|
|
|
|
|
|
Takes a boolean value. Defaults to "yes". |
136
|
|
|
|
|
|
|
', |
137
|
|
|
|
|
|
|
'type' => 'leaf', |
138
|
|
|
|
|
|
|
'value_type' => 'boolean', |
139
|
|
|
|
|
|
|
'write_as' => [ |
140
|
|
|
|
|
|
|
'no', |
141
|
|
|
|
|
|
|
'yes' |
142
|
|
|
|
|
|
|
] |
143
|
|
|
|
|
|
|
}, |
144
|
|
|
|
|
|
|
'FinalKillSignal', |
145
|
|
|
|
|
|
|
{ |
146
|
|
|
|
|
|
|
'description' => 'Specifies which signal to send to remaining |
147
|
|
|
|
|
|
|
processes after a timeout if C<SendSIGKILL> |
148
|
|
|
|
|
|
|
is enabled. The signal configured here should be one that is |
149
|
|
|
|
|
|
|
not typically caught and processed by services (C<SIGTERM> |
150
|
|
|
|
|
|
|
is not suitable). Developers can find it useful to use this to |
151
|
|
|
|
|
|
|
generate a coredump to troubleshoot why a service did not |
152
|
|
|
|
|
|
|
terminate upon receiving the initial C<SIGTERM> |
153
|
|
|
|
|
|
|
signal. This can be achieved by configuring C<LimitCORE> |
154
|
|
|
|
|
|
|
and setting C<FinalKillSignal> to either |
155
|
|
|
|
|
|
|
C<SIGQUIT> or C<SIGABRT>. |
156
|
|
|
|
|
|
|
Defaults to C<SIGKILL>. |
157
|
|
|
|
|
|
|
', |
158
|
|
|
|
|
|
|
'type' => 'leaf', |
159
|
|
|
|
|
|
|
'value_type' => 'uniline' |
160
|
|
|
|
|
|
|
}, |
161
|
|
|
|
|
|
|
'WatchdogSignal', |
162
|
|
|
|
|
|
|
{ |
163
|
|
|
|
|
|
|
'description' => 'Specifies which signal to use to terminate the |
164
|
|
|
|
|
|
|
service when the watchdog timeout expires (enabled through |
165
|
|
|
|
|
|
|
C<WatchdogSec>). Defaults to C<SIGABRT>. |
166
|
|
|
|
|
|
|
', |
167
|
|
|
|
|
|
|
'type' => 'leaf', |
168
|
|
|
|
|
|
|
'value_type' => 'uniline' |
169
|
|
|
|
|
|
|
} |
170
|
|
|
|
|
|
|
], |
171
|
|
|
|
|
|
|
'generated_by' => 'parse-man.pl from systemd 250 doc', |
172
|
|
|
|
|
|
|
'license' => 'LGPLv2.1+', |
173
|
|
|
|
|
|
|
'name' => 'Systemd::Common::Kill' |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
] |
176
|
|
|
|
|
|
|
; |
177
|
|
|
|
|
|
|
|