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
|
|
33474
|
use strict; |
|
4
|
|
|
1
|
|
8
|
|
|
4
|
|
|
1
|
|
104
|
|
|
1
|
|
|
|
|
5882
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
24
|
|
|
1
|
|
|
|
|
5818
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
11
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
1
|
|
9
|
|
|
4
|
|
|
1
|
|
611
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
148
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
154
|
|
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: |
78
|
|
|
|
|
|
|
the main process of a unit has exited (applies to C<KillMode>: |
79
|
|
|
|
|
|
|
C<mixed>)the delay configured via the C<TimeoutStopSec> has passed |
80
|
|
|
|
|
|
|
(applies to C<KillMode>: C<control-group>, C<mixed>, |
81
|
|
|
|
|
|
|
C<process>) |
82
|
|
|
|
|
|
|
the termination request is repeated with the C<SIGKILL> signal or the signal specified via |
83
|
|
|
|
|
|
|
C<FinalKillSignal> (unless this is disabled via the C<SendSIGKILL> |
84
|
|
|
|
|
|
|
option). See L<kill(2)> |
85
|
|
|
|
|
|
|
for more information. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Defaults to C<control-group>.', |
88
|
|
|
|
|
|
|
'type' => 'leaf', |
89
|
|
|
|
|
|
|
'value_type' => 'uniline' |
90
|
|
|
|
|
|
|
}, |
91
|
|
|
|
|
|
|
'KillSignal', |
92
|
|
|
|
|
|
|
{ |
93
|
|
|
|
|
|
|
'description' => 'Specifies which signal to use when stopping a service. This controls the signal that |
94
|
|
|
|
|
|
|
is sent as first step of shutting down a unit (see above), and is usually followed by |
95
|
|
|
|
|
|
|
C<SIGKILL> (see above and below). For a list of valid signals, see |
96
|
|
|
|
|
|
|
L<signal(7)>. |
97
|
|
|
|
|
|
|
Defaults to C<SIGTERM>. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Note that, right after sending the signal specified in this setting, systemd will always send |
100
|
|
|
|
|
|
|
C<SIGCONT>, to ensure that even suspended tasks can be terminated cleanly.', |
101
|
|
|
|
|
|
|
'type' => 'leaf', |
102
|
|
|
|
|
|
|
'value_type' => 'uniline' |
103
|
|
|
|
|
|
|
}, |
104
|
|
|
|
|
|
|
'RestartKillSignal', |
105
|
|
|
|
|
|
|
{ |
106
|
|
|
|
|
|
|
'description' => 'Specifies which signal to use when restarting a service. The same as |
107
|
|
|
|
|
|
|
C<KillSignal> described above, with the exception that this setting is used in a |
108
|
|
|
|
|
|
|
restart job. Not set by default, and the value of C<KillSignal> is used.', |
109
|
|
|
|
|
|
|
'type' => 'leaf', |
110
|
|
|
|
|
|
|
'value_type' => 'uniline' |
111
|
|
|
|
|
|
|
}, |
112
|
|
|
|
|
|
|
'SendSIGHUP', |
113
|
|
|
|
|
|
|
{ |
114
|
|
|
|
|
|
|
'description' => 'Specifies whether to send |
115
|
|
|
|
|
|
|
C<SIGHUP> to remaining processes immediately |
116
|
|
|
|
|
|
|
after sending the signal configured with |
117
|
|
|
|
|
|
|
C<KillSignal>. This is useful to indicate to |
118
|
|
|
|
|
|
|
shells and shell-like programs that their connection has been |
119
|
|
|
|
|
|
|
severed. Takes a boolean value. Defaults to "no". |
120
|
|
|
|
|
|
|
', |
121
|
|
|
|
|
|
|
'type' => 'leaf', |
122
|
|
|
|
|
|
|
'value_type' => 'boolean', |
123
|
|
|
|
|
|
|
'write_as' => [ |
124
|
|
|
|
|
|
|
'no', |
125
|
|
|
|
|
|
|
'yes' |
126
|
|
|
|
|
|
|
] |
127
|
|
|
|
|
|
|
}, |
128
|
|
|
|
|
|
|
'SendSIGKILL', |
129
|
|
|
|
|
|
|
{ |
130
|
|
|
|
|
|
|
'description' => 'Specifies whether to send |
131
|
|
|
|
|
|
|
C<SIGKILL> (or the signal specified by |
132
|
|
|
|
|
|
|
C<FinalKillSignal>) to remaining processes |
133
|
|
|
|
|
|
|
after a timeout, if the normal shutdown procedure left |
134
|
|
|
|
|
|
|
processes of the service around. When disabled, a |
135
|
|
|
|
|
|
|
C<KillMode> of C<control-group> |
136
|
|
|
|
|
|
|
or C<mixed> service will not restart if |
137
|
|
|
|
|
|
|
processes from prior services exist within the control group. |
138
|
|
|
|
|
|
|
Takes a boolean value. Defaults to "yes". |
139
|
|
|
|
|
|
|
', |
140
|
|
|
|
|
|
|
'type' => 'leaf', |
141
|
|
|
|
|
|
|
'value_type' => 'boolean', |
142
|
|
|
|
|
|
|
'write_as' => [ |
143
|
|
|
|
|
|
|
'no', |
144
|
|
|
|
|
|
|
'yes' |
145
|
|
|
|
|
|
|
] |
146
|
|
|
|
|
|
|
}, |
147
|
|
|
|
|
|
|
'FinalKillSignal', |
148
|
|
|
|
|
|
|
{ |
149
|
|
|
|
|
|
|
'description' => 'Specifies which signal to send to remaining |
150
|
|
|
|
|
|
|
processes after a timeout if C<SendSIGKILL> |
151
|
|
|
|
|
|
|
is enabled. The signal configured here should be one that is |
152
|
|
|
|
|
|
|
not typically caught and processed by services (C<SIGTERM> |
153
|
|
|
|
|
|
|
is not suitable). Developers can find it useful to use this to |
154
|
|
|
|
|
|
|
generate a coredump to troubleshoot why a service did not |
155
|
|
|
|
|
|
|
terminate upon receiving the initial C<SIGTERM> |
156
|
|
|
|
|
|
|
signal. This can be achieved by configuring C<LimitCORE> |
157
|
|
|
|
|
|
|
and setting C<FinalKillSignal> to either |
158
|
|
|
|
|
|
|
C<SIGQUIT> or C<SIGABRT>. |
159
|
|
|
|
|
|
|
Defaults to C<SIGKILL>. |
160
|
|
|
|
|
|
|
', |
161
|
|
|
|
|
|
|
'type' => 'leaf', |
162
|
|
|
|
|
|
|
'value_type' => 'uniline' |
163
|
|
|
|
|
|
|
}, |
164
|
|
|
|
|
|
|
'WatchdogSignal', |
165
|
|
|
|
|
|
|
{ |
166
|
|
|
|
|
|
|
'description' => 'Specifies which signal to use to terminate the |
167
|
|
|
|
|
|
|
service when the watchdog timeout expires (enabled through |
168
|
|
|
|
|
|
|
C<WatchdogSec>). Defaults to C<SIGABRT>. |
169
|
|
|
|
|
|
|
', |
170
|
|
|
|
|
|
|
'type' => 'leaf', |
171
|
|
|
|
|
|
|
'value_type' => 'uniline' |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
], |
174
|
|
|
|
|
|
|
'generated_by' => 'parse-man.pl from systemd 252 doc', |
175
|
|
|
|
|
|
|
'license' => 'LGPLv2.1+', |
176
|
|
|
|
|
|
|
'name' => 'Systemd::Common::Kill' |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
] |
179
|
|
|
|
|
|
|
; |
180
|
|
|
|
|
|
|
|