manager: Improve freeze/thaw for unrealized cgroup
authorAdrian Vovk <adrianvovk@gmail.com>
Mon, 22 Apr 2024 21:21:58 +0000 (17:21 -0400)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 23 Apr 2024 10:27:38 +0000 (12:27 +0200)
commit7923e9493c48694b32d1a6de7b9a996c0194bf17
treef1a9d9bd144ff6025576e5ca1ceb33774162a219
parent2a52385108ff1c7569a8166dd6655c4174f3f79d
manager: Improve freeze/thaw for unrealized cgroup

This is a follow-up for e50bfc89cefd4aafedaf2a7eacbf8b5ed80b134e

In that commit, we made Freeze/Thaw work with unrealized cgroups.
However, the unit was left in a strange state: it would be frozen by the
kernel but systemd would be unaware, and it remained possible to try and
realize the cgroup while the unit is supposed to be frozen. This commit
fixes the state tracking and prevents cgroups from being realized when
the unit is frozen.
src/core/cgroup.c