-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The cgroups string returned is built by joining the entries in
/proc/PID/cgroup by a comma. Unfortunately, cgroup controller names can
contain commas. This make parsing out the cgroups problematic.
$ cat /proc/self/cgroup
10:hugetlb:/
9:perf_event:/
8:net_cls,net_prio:/
7:freezer:/
6:devices:/user.slice
5:memory:/
4:blkio:/
3:cpu,cpuacct:/
2:cpuset:/
1:name=systemd:/user.slice/user-5160.slice/session-1.scope
It looks like anything that is a valid filename can be a controller name.
It might be better to return a tuple of entries.
- --Guy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlX7OY8ACgkQ0Bme0QyNhPS0LACeIIqTXz8rHRFlN62kSqga95XD
5b4AoJ265WuI1IJgCUMO5XlNI3vICy4A
=P5IY
-----END PGP SIGNATURE-----