Skip to main content

limit_files

Function limit_files 

Source
fn limit_files(
    mounts: &[CgroupMount],
    membership: Option<&str>,
    file_name: &str,
) -> Vec<PathBuf>
Expand description

Returns the paths of file_name in the cgroup at membership and in each of its ancestors, through every mount that shows them.

Mounts can overlap: a mount of a subtree shows the process’s cgroup but not the ancestors above the subtree, which a broader mount of the same hierarchy may still show. So this collects the paths from every mount whose root contains the cgroup.

A membership path that leaves the hierarchy (.., seen when the cgroup is outside this cgroup namespace) only checks the mount points.