package cgrouputil

import "github.com/rootless-containers/rootlesskit/pkg/parent/cgrouputil"

Index

Functions

func EvacuateCgroup2

func EvacuateCgroup2(evac string) error

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

cgrouputil.go moby_sys_mountinfo_tmphack.go

Version
v0.14.0
Published
Mar 16, 2021
Platform
js/wasm
Imports
9 packages
Last checked
2 hours ago

Tools for package owners.