From bc1e2f6df728f682d4d09a725a62e02547d833db Mon Sep 17 00:00:00 2001 From: Dhaval Giani Date: Wed, 13 Aug 2008 19:58:05 +0000 Subject: libcgroup: New API interfaces for task placement From: Vivek Goyal Enhancement to libcg to do following. - Parse the /etc/cgrules.conf file and place the task in the right cgroup. - Exported two APIs which can place the task based on /etc/cgrules.conf or based on cgroup explicitly specified by the caller. - There can be multiple users. - PAM module (pam_cgroup) - cgexec tool - cgclassify tool - APIs can be directly used by other cgroup aware user progarams. - Classification daemon Signed-off-by: Vivek Goyal Signed-off-by: Dhaval Giani git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@136 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- libcgroup.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libcgroup.h') diff --git a/libcgroup.h b/libcgroup.h index fe13758..ae73a22 100644 --- a/libcgroup.h +++ b/libcgroup.h @@ -168,6 +168,10 @@ int cgroup_delete_cgroup(struct cgroup *cgroup, int ignore_migration); int cgroup_attach_task_pid(struct cgroup *cgroup, pid_t tid); struct cgroup *cgroup_get_cgroup(struct cgroup *cgroup); +/* Changes the cgroup of calling application based on rule file */ +int cgroup_change_cgroup_uid_gid(uid_t uid, gid_t gid, pid_t pid); +int cgroup_change_cgroup_path(char *path, pid_t pid, char *controllers[]); + /* The wrappers for filling libcg structures */ struct cgroup *cgroup_new_cgroup(const char *name); -- cgit