Function systemd::login::get_cgroup [] [src]

pub fn get_cgroup(pid: Option<pid_t>) -> Result<String>

Determines the control group path of a process.

Specific processes can be optionally targeted via their PID. When no PID is specified, operation is executed for the calling process. This method can be used to retrieve the control group path of a specific process, relative to the root of the hierarchy. It returns the path without trailing slash, except for processes located in the root control group, where "/" is returned.