]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/bus-unit-util.c
core: add DelegateSubgroup= setting
authorLennart Poettering <lennart@poettering.net>
Fri, 21 Apr 2023 16:22:35 +0000 (18:22 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 27 Apr 2023 10:18:32 +0000 (12:18 +0200)
commita8b993dc11319292c54b301f3faffc4a05ab5ec1
treea5397671b291b436283716adee1ea3668c405714
parent1a56b0c05dc14fa91f0de24f230d9b9f35cc5b05
core: add DelegateSubgroup= setting

This implements a minimal subset of #24961, but in a lot more
restrictive way: we only allow one level of subcgroup (as that's enough
to address the no-processes in inner cgroups rule), and does not change
anything about threaded cgroup logic or similar, or make any of this new
behaviour mandatory.

All this does is this: all non-control processes we invoke for a unit
we'll invoke in a subgroup by the specified name.

We'll later port all our current services that use cgroup delegation
over to this, i.e. user@.service, systemd-nspawn@.service and
systemd-udevd.service.
docs/CGROUP_DELEGATION.md
man/org.freedesktop.systemd1.xml
man/systemd.resource-control.xml
src/core/cgroup.c
src/core/cgroup.h
src/core/dbus-cgroup.c
src/core/execute.c
src/core/load-fragment-gperf.gperf.in
src/core/load-fragment.c
src/core/load-fragment.h
src/shared/bus-unit-util.c