]> git.ipfire.org Git - thirdparty/systemd.git/commit - man/systemd.unit.xml
pid1: add SurviveFinalKillSignal= to skip units on final sigterm/sigkill spree
authorLuca Boccassi <bluca@debian.org>
Thu, 27 Jul 2023 22:14:31 +0000 (23:14 +0100)
committerLuca Boccassi <bluca@debian.org>
Thu, 28 Sep 2023 12:48:14 +0000 (13:48 +0100)
commit559214cbbd71d0f9a5b95edf7659610e25cd29cc
tree1f38178b7ed78e26e87913029d58494eb8f6bf2a
parent69feab97f991f766bd665c6ecc3958707a06f776
pid1: add SurviveFinalKillSignal= to skip units on final sigterm/sigkill spree

Add a new boolean for units, SurviveFinalKillSignal=yes/no. Units that
set it will not have their process receive the final sigterm/sigkill in
the shutdown phase.

This is implemented by checking if a process is part of a cgroup marked
with a user.survive_final_kill_signal xattr (or a trusted xattr if we
can't set a user one, which were added only in kernel v5.7 and are not
supported in CentOS 8).
12 files changed:
man/org.freedesktop.systemd1.xml
man/systemd-soft-reboot.service.xml
man/systemd.unit.xml
src/core/cgroup.c
src/core/dbus-unit.c
src/core/load-fragment-gperf.gperf.in
src/core/main.c
src/core/unit-serialize.c
src/core/unit.h
src/shared/bus-unit-util.c
src/shared/killall.c
test/units/testsuite-82.sh