The following is a simple example on how to adapt any longrun source directory to assign the process to a cgroup-v1.
First of all make sure the mount-cgroups-v1 service is started, it is part of goetia-linux.
Assume we start with the following
run script:
#!/bin/execlineb -P
fdmove -c 2 1
foo
-b
-a
-r
Add a background block in front,
so the entire final run script
looks as follows.
Replace RESTYPE
with the type of resource to limit,
e.g. cpu.
Replace GROUP
with the desired cgroup.
#!/bin/execlineb -P
fdmove -c 2 1
foreground {
redirfd -a 1 /sys/fs/cgroup/RESTYPE/GROUP/tasks
s6-svstat -p
}
foo
-b
-a
-r