Commit e4659536 by Daniel Lezcano Committed by Daniel Lezcano

fix clone_children path

This line is at the wrong place ... Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 03d56dff
...@@ -235,6 +235,8 @@ int lxc_cgroup_create(const char *name, pid_t pid) ...@@ -235,6 +235,8 @@ int lxc_cgroup_create(const char *name, pid_t pid)
return cgroup_rename_nsgroup(cgmnt, cgname, pid); return cgroup_rename_nsgroup(cgmnt, cgname, pid);
} }
snprintf(clonechild, MAXPATHLEN, "%s/cgroup.clone_children", cgmnt);
/* we check if the kernel has clone_children, at this point if there /* we check if the kernel has clone_children, at this point if there
* no clone_children neither ns_cgroup, that means the cgroup is mounted * no clone_children neither ns_cgroup, that means the cgroup is mounted
* without the ns_cgroup and it has not the compatibility flag * without the ns_cgroup and it has not the compatibility flag
...@@ -244,8 +246,6 @@ int lxc_cgroup_create(const char *name, pid_t pid) ...@@ -244,8 +246,6 @@ int lxc_cgroup_create(const char *name, pid_t pid)
return -1; return -1;
} }
snprintf(clonechild, MAXPATHLEN, "%s/cgroup.clone_children", cgmnt);
/* we enable the clone_children flag of the cgroup */ /* we enable the clone_children flag of the cgroup */
if (cgroup_enable_clone_children(clonechild)) { if (cgroup_enable_clone_children(clonechild)) {
SYSERROR("failed to enable 'clone_children flag"); SYSERROR("failed to enable 'clone_children flag");
......
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