[...] >> If I read the code correctly, for each rule in cgrules.conf it finds >> *one* PID and moves it to the right group. Shouldn't it work like for >> *every* PID find a matching rule and add it to its group? I think we >> have API for the "find a matching rule and add it to its group", all you >> need is to enumerate all PIDs. >> > > You are correct I'll clean it up, cgclassify.c has a nice snippet of > code that uses the API to do a similar thing. > > .John
I'll send a new patch with this code fix and remove the inotify piece. This will do two things, first solve the problem of catching running applications without having to run cgclassify from the cmd line or init scripts. And two give us an API for applications to call when they add control groups. Let me know if you think this is still too heavy and we can go the other way, add 'cgclassify' call to the init scripts and then I can implement this routine directly in my application. Thanks, John -- John Fastabend Intel Corporation ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel