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 <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2020-06-17 12:31:27 -07:00
parent 406298fdf0
commit 89516d17dd
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ func readProcsFile(file string) ([]int, error) {
out = append(out, pid) out = append(out, pid)
} }
} }
return out, nil return out, s.Err()
} }
// ParseCgroupFile parses the given cgroup file, typically /proc/self/cgroup // ParseCgroupFile parses the given cgroup file, typically /proc/self/cgroup