cgroups: add all services to the openrc cgroup
This is a modified version of a patch originally submitted by Patrick Lauer <patrick@gentoo.org>.
This commit is contained in:
parent
7ea5c614d9
commit
ab9cf25197
@ -194,6 +194,14 @@ unset _conf_d
|
||||
# Load any system overrides
|
||||
sourcex -e "@SYSCONFDIR@/rc.conf"
|
||||
|
||||
if [ "$RC_UNAME" = "Linux" ]; then
|
||||
if [ -d /sys/fs/cgroup/openrc ]; then
|
||||
mkdir -p /sys/fs/cgroup/openrc/${RC_SVCNAME}
|
||||
echo $$ > /sys/fs/cgroup/openrc/${RC_SVCNAME}/tasks
|
||||
fi
|
||||
#todo: add processes to cgroups based on settings in conf.d
|
||||
fi
|
||||
|
||||
# Apply any ulimit defined
|
||||
[ -n "${rc_ulimit:-$RC_ULIMIT}" ] && ulimit ${rc_ulimit:-$RC_ULIMIT}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user