summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2009-08-04 14:28:09 +0200
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-08-06 11:51:34 +0530
commit40716a24b737e55422b31b926996720ed9bca6bb (patch)
tree0380dff52651492771bf3b9803a2d33222c69162 /include
parent8f9708390b12f8101851ddfeb49d37688a76a20b (diff)
downloadlibcg-40716a24b737e55422b31b926996720ed9bca6bb.tar.gz
libcg-40716a24b737e55422b31b926996720ed9bca6bb.tar.xz
libcg-40716a24b737e55422b31b926996720ed9bca6bb.zip
Split cgroup removal to separate functions.
Changelog: - simplify error handling in cg_move_task_files cgroup_delete_cgroup does all the stuff on it's own. This patch refactors the function and moves the parts with complete error handling. The new functions are cg_delete_cgroup_controller and cg_move_task_files. They are not necessarily needed, but it simplifies error handling and clearly distinguishes functionality of cgroup_delete_cgroup. Purpose of the functions should be clearly specified in the doxygen comments. Especially note that cg_delete_cgroup_controller wants already opened file, where all tasks should be moved - this is optimization, which will be used in subsequent patches. I could use cgroup_get_task_* and cgroup_attach_task, which would look definitely nicer, but it would lead to lot of fopen() and fclose() calls. Let me know what do you think about it. Signed-off-by: Jan Safranek <jsafrane@redhat.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions