ARM-software / devlib

Library for interaction with and instrumentation of remote devices.
Apache License 2.0
47 stars 78 forks source link

Validate cgroups_run_into has taken effect #687

Closed ep1cman closed 5 months ago

ep1cman commented 5 months ago

On some systems this seems to have no effect, leaving the executed shell in the root cgroup. Before, this function would still execute and the end user would think the desired process was run in the cgroup when infact it had not.

douglas-raillard-arm commented 5 months ago

Not a comment on the goal of this PR but the cgroups module has deep design flaws. I very strongly recommend you update your code to use the cgroups2 module, which among other things provides support for both cgroup v1 and v2 with a unified API (i.e. it's just a parameter, you get support for both with the same client code). It also actually let you build a cgroup hierarchy unlike cgroups that is built around a very narrow use of cgroups with a poor quality implementation (e..g it leaks grep patterns in the Python API, making maintenance problematic)