cgfs: prune the init scope from paths

Just as cgmanager does, if we are calculating a task's paths, drop
the trailing '/init.scope'.  We don't want the container to sit under
there.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn 2016-01-31 16:34:54 +01:00
parent 79c59e6b77
commit 3939a22a48

View File

@ -1662,6 +1662,7 @@ lxc_cgroup_process_info_getx(const char *proc_pid_cgroup_str,
entry->cgroup_path = strdup(colon2);
if (!entry->cgroup_path)
goto out_error;
prune_init_scope(entry->cgroup_path);
*cptr = entry;
cptr = &entry->next;