mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-11 04:58:19 +03:00
core/slice: skip member units without realized cgroup during freeze or thaw
This ensures that services with `RemainAfterExit` but without any process running won't cause failure during freeze. (cherry picked from commit fcb0878f7563df9701a4d066378995c0b7ec32be) (cherry picked from commit 2eb040f36f65c316c0d015d024faf9d27db10821) (cherry picked from commit 9a0bd2ff7004fbc3c801430ec48054a48ae77b59)
This commit is contained in:
parent
050a356d04
commit
a62fc7d66c
@ -381,6 +381,9 @@ static int slice_freezer_action(Unit *s, FreezerAction action) {
|
||||
}
|
||||
|
||||
UNIT_FOREACH_DEPENDENCY(member, s, UNIT_ATOM_SLICE_OF) {
|
||||
if (!member->cgroup_realized)
|
||||
continue;
|
||||
|
||||
if (action == FREEZER_FREEZE)
|
||||
r = UNIT_VTABLE(member)->freeze(member);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user