On Wed, Feb 09, 2011 at 04:52:15PM +0530, Balbir Singh wrote: > On 02/08/2011 08:05 PM, Jiri Slaby wrote: > > Hi, > > > > I have a program: > > #include <err.h> > > #include <stdio.h> > > #include <stdlib.h> > > #include <unistd.h> > > > > #include <sys/types.h> > > #include <sys/wait.h> > > > > static void child(unsigned int id) > > { > > if (setuid(1000)) > > err(2, "setuid"); > > sleep(5+id); > > exit(id); > > } > > > > int main(int argc, char **argv) > > { > > unsigned int a; > > > > for (a = 0; a < 5; a++) > > if (fork() == 0) > > child(a); > > for (a = 0; a < 5; a++) > > wait(NULL); > > > > return 0; > > } > > > > > > ============================ > > > > > > In cgconfig.conf there is: > > group cpu1 { > > cpuset { > > cpuset.cpus=1; > > cpuset.mems=0; > > } > > } > > group cpu0 { > > cpuset { > > cpuset.cpus=0; > > cpuset.mems=0; > > } > > } > > group others { > > cpuset { > > cpuset.cpus=0-1; > > cpuset.mems=0; > > } > > } > > mount { > > cpuset = /mnt/cpu; > > } > > > > > > ============================ > > > > > > cgrules.conf are as simple as: > > xslaby * cpu0/ > > man * cpu1/ > > * * others/ > > > > > > ============================ > > > > > > And now if I run the program under root as: > > # cgexec -g *:cpu1 --sticky ./fork > > the children are moved into the cpu0 group despite the sticky option. > > The same as for non-sticky case. > > > > I'm using the latest GIT snapshot. > > > > Any ideas what's wrong? > > CC'ing Vivek for a quick answer!
Looks like --sticky option has been added by Ken'ichi Ohmichi. CCing him. Thanks Vivek ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel