diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-30 14:10:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-30 14:10:18 -0400 |
commit | 1a1e3f4b24e6f856a5c2e16da0cc34a8191c9403 (patch) | |
tree | b194d44be8629db2cab3dffbb078ce77b27dc72f /utils/utils_supported.go | |
parent | 6fbd1570f86fc2509b6842c28dc2bc2e75e696d2 (diff) | |
parent | f54408bf06e48ed125d791660d5d55fef913f433 (diff) | |
download | podman-1a1e3f4b24e6f856a5c2e16da0cc34a8191c9403.tar.gz podman-1a1e3f4b24e6f856a5c2e16da0cc34a8191c9403.tar.bz2 podman-1a1e3f4b24e6f856a5c2e16da0cc34a8191c9403.zip |
Merge pull request #6823 from giuseppe/allow-cgroup-with-column-name
utils: fix parsing of cgroup with : in the name
Diffstat (limited to 'utils/utils_supported.go')
-rw-r--r-- | utils/utils_supported.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/utils_supported.go b/utils/utils_supported.go index 201ddb57b..4258e6d7a 100644 --- a/utils/utils_supported.go +++ b/utils/utils_supported.go @@ -64,7 +64,7 @@ func getCgroupProcess(procFile string) (string, error) { cgroup := "/" for scanner.Scan() { line := scanner.Text() - parts := strings.Split(line, ":") + parts := strings.SplitN(line, ":", 3) if len(parts) != 3 { return "", errors.Errorf("cannot parse cgroup line %q", line) } @@ -116,7 +116,7 @@ func MoveUnderCgroupSubtree(subtree string) error { scanner := bufio.NewScanner(f) for scanner.Scan() { line := scanner.Text() - parts := strings.Split(line, ":") + parts := strings.SplitN(line, ":", 3) if len(parts) != 3 { return errors.Errorf("cannot parse cgroup line %q", line) } |