Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: sh/
Date: Fri, 18 Nov 2011 06:06:30
Message-Id: 62f4438376098f20ed293fec1fec6fabc014b7ef.WilliamH@gentoo
1 commit: 62f4438376098f20ed293fec1fec6fabc014b7ef
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 18 05:49:07 2011 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 18 05:55:32 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=62f44383
7
8 CGroups: finish initializing the CGroup
9
10 When a CGroup is created, we need to copy cpuset.cpus and cpuset.mems
11 from the new group's parent into the new group before we can attach any
12 processes to it.
13
14 ---
15 sh/runscript.sh.in | 2 ++
16 1 files changed, 2 insertions(+), 0 deletions(-)
17
18 diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
19 index ca9c133..722364a 100644
20 --- a/sh/runscript.sh.in
21 +++ b/sh/runscript.sh.in
22 @@ -194,6 +194,8 @@ if [ -d /sys/fs/cgroup/ ]; then
23 # use RC_SVCNAME unless overridden in conf.d
24 SVC_CGROUP=${rc_cgroup:-$RC_SVCNAME}
25 mkdir -p /sys/fs/cgroup/${SVC_CGROUP}
26 + cp /sys/fs/cgroup/cpuset.cpus /sys/fs/cgroup/${SVC_CGROUP}
27 + cp /sys/fs/cgroup/cpuset.mems /sys/fs/cgroup/${SVC_CGROUP}
28 # now attach self to cgroup - any children of this process will inherit this
29 echo $$ > /sys/fs/cgroup/${SVC_CGROUP}/tasks
30 # TODO: set res limits from conf.d