Skip to content

Commit

Permalink
cgfs: prune the init scope from paths
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hallyn authored and stgraber committed Nov 17, 2016
1 parent cb45908 commit 05c03fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lxc/cgfs.c
Expand Up @@ -1661,6 +1661,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;
Expand Down

0 comments on commit 05c03fe

Please sign in to comment.