Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle process cgroup paths containng ':'
Cgroup paths containing ':' will cause `Process::cgroups` to return an incomplete pathname. The reason is that parsing the fields in `/proc/self/cgroup` is perform with `.split(':')`. If something as follows is set: ```bash mkdir /sys/fs/cgroup/memory/foo:bar echo $$ > /sys/fs/cgroup/memory/foo:bar/tasks cat /proc/self/cgroup ... 8:memory:/foo:bar ... ``` the resulting `ProcessCgroup` will have a `pathname` equal to just `/foo`. This patch addresses this by taking the remainer of the line after the second ':' as the pathname. This is safe because `cgroups(7)` describes `/proc/self/cgroup` as only having 3 fields.
- Loading branch information