From 1b5f3ed24d367cc30432b8a260d1e9465b979c2b Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 10 Feb 2021 18:27:04 +0100 Subject: [PATCH] utils: create parent cgroups Signed-off-by: Giuseppe Scrivano --- utils/utils_supported.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils_supported.go b/utils/utils_supported.go index 9a1c82ee6b..7a0417c6c2 100644 --- a/utils/utils_supported.go +++ b/utils/utils_supported.go @@ -166,7 +166,7 @@ func moveUnderCgroup(cgroup, subtree string, processes []uint32) error { parentCgroup = parts[2] } newCgroup := filepath.Join(cgroupRoot, parentCgroup, subtree) - if err := os.Mkdir(newCgroup, 0755); err != nil && !os.IsExist(err) { + if err := os.MkdirAll(newCgroup, 0755); err != nil && !os.IsExist(err) { return err }