mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 16:34:45 +07:00
As of now, the default finit cgroup behavior is to use a unified hierarchy of controllers under /sys/fs/cgroup/finit. We mount cpu,cpuacct,cpuset,memory (if available) and gain the ability to control our three major groups: init, system, user. The default CPU share setup is ~10% for init and user, and 90% for system. These are guaranteed CPU shares to ensure we do not starve PID 1 or user processes. Support for configuring these limits will be added in a later commit. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
12 lines
241 B
Bash
Executable File
12 lines
241 B
Bash
Executable File
#!/bin/sh
|
|
# Called by kernel when last child in cgroup exists
|
|
|
|
BASE=/sys/fs/cgroup/finit
|
|
PROC=$(basename "$1")
|
|
DIR="$BASE$1"
|
|
|
|
#/libexec/finit/logit -p daemon.info -t finit "$PROC stopped, cleaning up control group $DIR"
|
|
rmdir "$DIR"
|
|
|
|
exit 0
|