in rc/sh/openrc-run.sh ~line 267: cgroup_add_service /sys/fs/cgroup/openrc cgroup_add_service /sys/fs/cgroup/systemd/system but rc/sh/rc-cgroup.sh cgroup_add_service() takes no parameters, and "just" relocates the current PID to the top level of all cgroup hierarchies. So this code is redundant and misleading.
I can't figure out from git history when this changed - 2391ddff772ce541bc2237c89a2792a0b85e076c adds: + if [ -d "$1" ]; then + cgroup="$1/$RC_SVCNAME" with that the syntax in openrc-run.sh makes sense. But I don't see it removed, and I don't see it in the current file, so I'm very wtf
Ah, it was undone in the merge commit of itself - 88cdcc145eb6343b94626ab3910a5eb1f8654212 merges the branch with the chance, had a conflict, and accidentally drops the important bit: -cgroup_set_limits() +cgroup_add_service() { - if [ -d "$1" ]; then - cgroup="$1/$RC_SVCNAME"
This has been fixed in the following commit: http://github.com/openrc/openrc/commit/cee3919