Commit Graph

8 Commits

Author SHA1 Message Date
Aidan Harris
eaa42da9a6 Use cgroup.kill in cgroup_cleanup when possible
The old code is moved to a cgroup_fallback_cleanup function and only
 called if cgroup2_kill fails.

 This fixes #454.
2021-10-15 22:10:37 -05:00
William Hubbs
7f47539fb1 sh/rc-cgroup.sh: fix case in starting message
X-Gentoo-Bug: 804193
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=804193
2021-08-12 14:23:34 -05:00
William Hubbs
9c7bedca9e sh/rc-cgroup.sh: fix cgroup_cleanup
X-Gentoo-Bug: 804193
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=804193
2021-08-12 14:21:58 -05:00
William Hubbs
533a8c70b3 cgroup2_set_limits: fix harmless error message
In legacy cgroups mode, we were running `mountinfo -q ""` which was
generating an error message. If we return immediately when
cgroup2_find_path returns an empty value, we avoid this message.
2021-04-04 17:31:49 -05:00
William Hubbs
08d518b7fe rc_cgroup.sh: do not add newline when writing group2 values
Fixes: #407
2021-03-15 16:59:43 -05:00
William Hubbs
de77674663 rc-cgroup.sh: avoid process substitution for cgroup_get_pids
This should make cgroup_cleanup work successfully since cgroup_get_pids
no longer uses a subshell.

This fixes #396.
This fixes #397.
2021-03-01 14:21:24 -06:00
E5ten
87cfad3d6c cgroup2_set_limits: verify that the cgroup2 path is a mount point
prior to cgroups getting mounted, /sys/fs/cgroup will still exist,
but attempts to make directories in it will fail, change cgroup2_set_limits() to
verify that cgroups are mounted instead of just checking that /sys/fs/cgroup
exists.

This fixes #307.
This fixes #321.
2019-09-03 16:38:03 -05:00
William Hubbs
d95425b08a rc-cgroup.sh: remove shebang line
This is not a stand-alone script, so it does not need the shebang line.
This also means it is not necessary to run this through sed.
2018-12-07 15:31:13 -06:00