Commit f3d7477c by Serge Hallyn Committed by GitHub

Merge pull request #1290 from brauner/2016-11-09/named_controllers

cgroups: skip v2 hierarchy entry
parents bedea597 ff8d6ee9
......@@ -686,6 +686,18 @@ static void get_existing_subsystems(char ***klist, char ***nlist)
if (!p2)
continue;
*p2 = '\0';
/* If we have a mixture between cgroup v1 and cgroup v2
* hierarchies, then /proc/self/cgroup contains entries of the
* form:
*
* 0::/some/path
*
* We need to skip those.
*/
if ((p2 - p) == 0)
continue;
for (tok = strtok_r(p, ",", &saveptr); tok;
tok = strtok_r(NULL, ",", &saveptr)) {
if (strncmp(tok, "name=", 5) == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment