summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2009-06-22 17:20:09 +0530
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-06-22 17:20:09 +0530
commitb761e6e872d2ef159f0d2e6d80c3fe2b6218bf19 (patch)
tree48da511eeb7d22e44a89a2ce3127b1e97f338449 /include
parent3ee2b056852a65bc7a3128ef924f1ae83573016e (diff)
downloadlibcg-b761e6e872d2ef159f0d2e6d80c3fe2b6218bf19.tar.gz
libcg-b761e6e872d2ef159f0d2e6d80c3fe2b6218bf19.tar.xz
libcg-b761e6e872d2ef159f0d2e6d80c3fe2b6218bf19.zip
libcgroup: Introduce a unload cgroups API
This API will unload the cgroups created in the cgroupfs and unmount and delete the filesystem mount point. The action is equivalent to what is done currently in service cgconfig stop. The reason for this API is to make sure we don't end up with a asymmetric library API subset. Today an application program can programatically through cgroup_config_load_config() load a configuration file, but has no means to cleanup (including all temporarily created groups). changes from v3 1. Address Jan's comments from http://article.gmane.org/gmane.comp.lib.libcg.devel/1105 changes from v2 1. Fix a leak as noted by Bharata 2. Address Balbir's review comments at http://article.gmane.org/gmane.comp.lib.libcg.devel/1080 changes from v1 1. Change the name of the function to cgroup_unload_cgroups 2. Change the name of the executatble to cgclear 3. Split out the funtions Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcgroup.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libcgroup.h b/include/libcgroup.h
index e2abdc8..ce0d8a5 100644
--- a/include/libcgroup.h
+++ b/include/libcgroup.h
@@ -368,6 +368,7 @@ struct cgroup_controller *cgroup_get_controller(struct cgroup *cgroup,
* Config related stuff
*/
int cgroup_config_load_config(const char *pathname);
+int cgroup_unload_cgroups(void);
__END_DECLS