#435

kill_pg could use cgroups if available

Openpzmarzlyopened 1y ago

Killing a process tree is a hard problem. In dinit, it is currently done via process groups:

https://github.com/davmac314/dinit/blob/712e1faa6e2faeb4e56d925334266976904096e9/src/baseproc-service.cc#L438-L453

Linux 5.14 added cgroup.kill, which can be used to atomically SIGKILL entire cgroup: https://lwn.net/Articles/855049/

Could dinit also use it, if compiled with cgroup support enabled?

Activity

5
davmac3141y ago

Yes, at some point there should be consideration of this. The cgroups support in general needs to be enhanced and there is already a ticket for that in #397

davmac3141y ago

Yes, at some point there should be consideration of this. The cgroups support in general needs to be enhanced and there is already a ticket for that in #397

davmac3141y ago

(However, this will be post-1.0).

davmac3141y ago

(However, this will be post-1.0).

termermc2mo ago

Any progress on this? I'm dealing with extreme cgroup-related pain on OpenRC and this would be awesome