From 29619d419bcfb8870ff73efcce591943aaf948cd Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 2 Feb 2021 22:23:45 +0100 Subject: [PATCH] attach: check for ENOCGROUP2 explicitly Signed-off-by: Christian Brauner --- src/lxc/attach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 5f8114b2f..ee18bfa3e 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -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); -- 2.47.2