diff options
author | William Hubbs <williamh@gentoo.org> | 2011-11-17 23:49:07 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2011-11-17 23:55:32 -0600 |
commit | 62f4438376098f20ed293fec1fec6fabc014b7ef (patch) | |
tree | 77a64538bd307114ccac84cc8d4afb35b6bf028d /sh/runscript.sh.in | |
parent | 0bbb764f70dcbaa8cfa3ffbb2b318274d1180120 (diff) |
CGroups: finish initializing the CGroup
When a CGroup is created, we need to copy cpuset.cpus and cpuset.mems
from the new group's parent into the new group before we can attach any
processes to it.
Diffstat (limited to 'sh/runscript.sh.in')
-rw-r--r-- | sh/runscript.sh.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index ca9c1336..722364ab 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -194,6 +194,8 @@ if [ -d /sys/fs/cgroup/ ]; then # use RC_SVCNAME unless overridden in conf.d SVC_CGROUP=${rc_cgroup:-$RC_SVCNAME} mkdir -p /sys/fs/cgroup/${SVC_CGROUP} + cp /sys/fs/cgroup/cpuset.cpus /sys/fs/cgroup/${SVC_CGROUP} + cp /sys/fs/cgroup/cpuset.mems /sys/fs/cgroup/${SVC_CGROUP} # now attach self to cgroup - any children of this process will inherit this echo $$ > /sys/fs/cgroup/${SVC_CGROUP}/tasks # TODO: set res limits from conf.d |