Skip to content

Commit

Permalink
attach: check for ENOCGROUP2 explicitly
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 2, 2021
1 parent 6b55ce0 commit 29619d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/attach.c
Expand Up @@ -1522,7 +1522,7 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function,
* enough.
*/
ret = cgroup_attach(conf, name, lxcpath, pid);
if (ret) {
if (ret == -ENOCGROUP2) {
call_cleaner(cgroup_exit) struct cgroup_ops *cgroup_ops = NULL;

cgroup_ops = cgroup_init(conf);
Expand Down

0 comments on commit 29619d4

Please sign in to comment.