From 89516d17dd8f9b54a4ebcf17143d0016a4521fe8 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 17 Jun 2020 12:31:27 -0700 Subject: [PATCH] libct/cgroups/readProcsFile: ret errorr if scan failed Not sure why but the errors from scanner were ignored. Such errors can happen if open(2) has succeeded but the subsequent read(2) fails. Signed-off-by: Kir Kolyshkin --- libcontainer/cgroups/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/cgroups/utils.go b/libcontainer/cgroups/utils.go index b86c41516..6e88b5dff 100644 --- a/libcontainer/cgroups/utils.go +++ b/libcontainer/cgroups/utils.go @@ -138,7 +138,7 @@ func readProcsFile(file string) ([]int, error) { out = append(out, pid) } } - return out, nil + return out, s.Err() } // ParseCgroupFile parses the given cgroup file, typically /proc/self/cgroup