]> git.ipfire.org Git - thirdparty/systemd.git/commit
manager: Freeze/Thaw: Don't fail units w/o cgroup
authorAdrian Vovk <adrianvovk@gmail.com>
Fri, 29 Mar 2024 00:38:09 +0000 (20:38 -0400)
committerMike Yuan <me@yhndnzj.com>
Fri, 29 Mar 2024 18:58:53 +0000 (02:58 +0800)
commite50bfc89cefd4aafedaf2a7eacbf8b5ed80b134e
tree12a8c84c448232749e351fcc90217614016c44c6
parenta7f2019055e723c5c7f8988196be4ad5fe377f0a
manager: Freeze/Thaw: Don't fail units w/o cgroup

Previously, it was impossible to freeze or thaw a slice if it is an
ancestor to a unit that had no running cgroup (i.e. a service with
RemainAfterExit=yes). Instead of failing with EBUSY (which would
confusingly get reported as "Unit has pending job") we just silently
no-op.

I noticed this because we now have user-runtime-dir@.service, which
would make it impossible to freeze/thaw user.slice or user-<UID>.slice
src/core/cgroup.c