attach: check for ENOCGROUP2 explicitly

parent 6b55ce0e
...@@ -1522,7 +1522,7 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function, ...@@ -1522,7 +1522,7 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function,
* enough. * enough.
*/ */
ret = cgroup_attach(conf, name, lxcpath, pid); ret = cgroup_attach(conf, name, lxcpath, pid);
if (ret) { if (ret == -ENOCGROUP2) {
call_cleaner(cgroup_exit) struct cgroup_ops *cgroup_ops = NULL; call_cleaner(cgroup_exit) struct cgroup_ops *cgroup_ops = NULL;
cgroup_ops = cgroup_init(conf); cgroup_ops = cgroup_init(conf);
......
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