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