fn write_all_subtree_control<P>(path: P, controller: &str) -> Result<()>
    where
        P: AsRef<Path>,
    {
        let cg_subtree_ctrl = path.as_ref().join("cgroup.subtree_control");
        if !cg_subtree_ctrl.exists() {
            return Ok(());
        }
        let parent = match path.as_ref().parent() {
            Some(p) => p,
            None => {
                writeln_special(&cg_subtree_ctrl, format!("+{}", &controller))?;
                return Ok(());
            }
        };

        Self::write_all_subtree_control(&parent, &controller)?;
        writeln_special(&cg_subtree_ctrl, format!("+{}", &controller))
    }
// Enables the specified controller along the cgroup nested path.
// To be able to use a leaf controller within a nested cgroup hierarchy,
// the controller needs to be enabled by writing to the cgroup.subtree_control
// of it's parent. This rule applies recursivelly.
Enables the specified controller along the cgroup nested path.
To be able to use a leaf controller within a nested cgroup hierarchy,
the controller needs to be enabled by writing to the cgroup.subtree_control
of it's parent. This rule applies recursivelly.
Enables the specified controller along the cgroup nested path . To be able to use a leaf controller within a nested cgroup hierarchy the controller needs to be enabled by writing to the cgroup . subtree_control of it ' s parent . This rule applies recursivelly .
fn write_all_subtree_control<P>(path: P, controller: &str) -> Result<()>
    where
        P: AsRef<Path>,
    {
        let cg_subtree_ctrl = path.as_ref().join("cgroup.subtree_control");
        if !cg_subtree_ctrl.exists() {
            return Ok(());
        }
        let parent = match path.as_ref().parent() {
            Some(p) => p,
            None => {
                writeln_special(&cg_subtree_ctrl, format!("+{}", &controller))?;
                return Ok(());
            }
        };
        Self::write_all_subtree_control(&parent, &controller)?;
        writeln_special(&cg_subtree_ctrl, format!("+{}", &controller))
    }
fn write_all_subtree_control < P > ( path : P , controller : & str ) -> Result < ( ) > where P : AsRef < Path > , { let cg_subtree_ctrl = path . as_ref ( ) . join ( " " ) ; if ! cg_subtree_ctrl . exists ( ) { return Ok ( ( ) ) ; } let parent = match path . as_ref ( ) . parent ( ) { Some ( p ) => p , None => { writeln_special ( & cg_subtree_ctrl , format ! ( " " controller ) ) ? ; return Ok ( ( ) ) ; } } ; Self :: write_all_subtree_control ( & parent , & controller ) ? ; writeln_special ( & cg_subtree_ctrl , format ! ( " " controller ) ) }
Enables the specified controller along the cgroup nested path.
Enables the specified controller along the cgroup nested path .
path
P
controller
&str
path
P
controller
&str