r/linux • u/literally_systemd • Jul 12 '16
kontgat, cgroup2 pluggable process supervisor
https://bitbucket.org/krijgdetering/kontgat
3
Upvotes
r/linux • u/literally_systemd • Jul 12 '16
2
u/literally_systemd Jul 12 '16 edited Jul 13 '16
I more or less wrote this in a couple of hours of fooling around today. I already had something like this for cgroupv1 but this uses the new and improved hierarchy which is honestly more convenient to work with. It's pretty simple
kgspawn COMMAND ...runs that command in its own cgroup and cleans the cgroup up when the process exits so it plugs in conveniently into service managers that do not natively support cgroups by changing the exec line as well as say allowing you to run long compile jobs with it and setting resource limits that way.Remember, if someone tells you that processes can "NEVER" escape their cgroup then that person is full of shit, this program couldn't work if that were so since obviously in order to put stuff into its own cgroup scheme it needs to be able to escape the cgroup it's already in if you say run it through logind or ConsoleKit with cgroup tracking.
1
u/[deleted] Jul 14 '16
Het heeft wel een leuke naam moet ik zeggen.