aristanetworks / bst

A one-stop shop for process isolation
MIT License
101 stars 9 forks source link

cgroup,setup: set CGROUP_PATH in setup program with full path to current cgroup #85

Closed Snaipe closed 1 year ago

Snaipe commented 1 year ago

It is useful for the setup program to be able to change or inspect the cgroup directory of the spacetime process. The problem is that by the time the setup program executes, bst will have pivoted into the cgroup namespace, leaving it with no consistent way to know what the path of that cgroup is.

This commit arranges for the path of the cgroup to be defined in the CGROUP_PATH environment variable when the setup program executes.