On 02/14/2013 12:52 AM, Jan Safranek wrote: > On 02/13/2013 08:06 PM, John Fastabend wrote: >> Add routine to scan rules.conf file and move matching running tasks >> in /proc/pid/* into configured control groups. Then at init time >> we can move running tasks into the correct control group. >> >> Expose this routine via libcg so other applications can use it >> to classify existing applications after creating control groups. >> >> CC: Jan Safranek <jsafr...@redhat.com> >> Signed-off-by: John Fastabend <john.r.fastab...@intel.com> > > The code is perfect now. There is just some 'bureaucracy' remaining. > >> --- >> include/libcgroup/tasks.h | 1 + >> src/api.c | 37 +++++++++++++++++++++++++++++++++++++ >> src/daemon/cgrulesengd.c | 5 +++++ >> src/libcgroup.map | 1 + >> 4 files changed, 44 insertions(+) >> >> diff --git a/include/libcgroup/tasks.h b/include/libcgroup/tasks.h >> index 0f79220..1a4f0f5 100644 >> --- a/include/libcgroup/tasks.h >> +++ b/include/libcgroup/tasks.h >> @@ -109,6 +109,7 @@ int cgroup_reload_cached_rules(void); >> * @param fp Destination file, where the rules will be printed. >> */ >> void cgroup_print_rules_config(FILE *fp); >> +int cgroup_scan_rules_config(void); > > Please provide also documentation of the function in doxygen comment, > see cgroup_print_rules_config for inspiration.
I'll do this in v3. > > Also, I don't like cgroup_scan_rules_config name. It's quite cryptic and > does not describe what the function does. We already have > cgroup_change_cgroup_uid_gid, so what about... cgroup_change_all_cgroups()? > Sounds good to me. Thanks for reviewing! -- 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