From 8d6f6f933e61d9052bdaebd730962cae87bc4b12 Mon Sep 17 00:00:00 2001 From: miaogaolin <57740293+miaogaolin@users.noreply.github.com> Date: Wed, 13 Jan 2021 20:39:57 +0800 Subject: [PATCH] fix cgroup bug (#380) --- core/stat/internal/cgroup_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/stat/internal/cgroup_linux.go b/core/stat/internal/cgroup_linux.go index a2dff6b8..73659129 100644 --- a/core/stat/internal/cgroup_linux.go +++ b/core/stat/internal/cgroup_linux.go @@ -92,11 +92,12 @@ func currentCgroup() (*cgroup, error) { continue } - cgroups[subsys] = path.Join(cgroupDir, subsys) if strings.Contains(subsys, ",") { for _, k := range strings.Split(subsys, ",") { cgroups[k] = path.Join(cgroupDir, k) } + } else { + cgroups[subsys] = path.Join(cgroupDir, subsys) } }