Skip to content

clean up nested cgroups #963

@TommyCox

Description

@TommyCox

I created an OpenRC init script (OpenRC 0.62.10) for a proprietary daemon that appears to be creating a cgroup for its child process. This prevents cleanup of /sys/fs/cgroup/openrc.daemon because /sys/fs/cgroup/openrc.daemon/child.process also exists. Since the Gentoo Wiki page on OpenRC cgroups seems to expect this, perhaps nested cgroup directories should be cleaned up?

I saw that @navi-desu is reworking cgroups in #820, so perhaps just add this as an edge case to test (if it's even relevant in the rework)?

I worked around the problem by manually overriding stop() to delete the nested cgroup. The default cleanup functions still seem to run in this case and clean up the daemon's cgroup directory as well.

I haven't learned much about cgroups yet, so if my guesses are totally off and you need more specific details let me know.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions