package cgrouputil
import "github.com/rootless-containers/rootlesskit/pkg/parent/cgrouputil"
Index ¶
Functions ¶
func EvacuateCgroup2 ¶
EvacuateCgroup2 evacuates cgroup2. Must be called in the parent PID namespace.
When the current process belongs to "/foo" group (visible under "/sys/fs/cgroup/foo") and evac is like "bar", - All processes in the "/foo" group are moved to "/foo/bar" group, by writing PIDs into "/sys/fs/cgroup/foo/bar/cgroup.procs" - As many controllers as possible are enabled for "/foo/*" groups, by writing "/sys/fs/cgroup/foo/cgroup.subtree_control"
Returns nil when cgroup2 is not enabled. Ported from https://github.com/rootless-containers/usernetes/commit/46ad812db7489914897ff8b1774f2fab0efda62b
Source Files ¶
- Version
- v0.13.0
- Published
- Feb 1, 2021
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 2 hours ago –
Tools for package owners.