Skip to content

Commit

Permalink
ParseCgroupFile: fix wrong comment about unified hierarchy
Browse files Browse the repository at this point in the history
ref: fe19473

Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed May 26, 2022
1 parent a8e04ba commit dae6735
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,7 @@ func parseKV(raw string) (string, uint64, error) {
// "pids": "/user.slice/user-1000.slice"
// etc.
//
// Note that for cgroup v2 unified hierarchy, there are no per-controller
// cgroup paths, so the resulting map will have a single element where the key
// is empty string ("") and the value is the cgroup path the <pid> is in.
// The resulting map does not have an element for cgroup v2 unified hierarchy.
func ParseCgroupFile(path string) (map[string]string, error) {
f, err := os.Open(path)
if err != nil {
Expand Down

0 comments on commit dae6735

Please sign in to comment.