ARM-software / devlib

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

Validate cgroups_run_into has taken effect #687

Closed ep1cman closed 1 month ago

ep1cman commented 2 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 2 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)