diff options
author | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-01-09 16:27:48 +0000 |
---|---|---|
committer | Dhaval Giani <dhaval@linux.vnet.ibm.com> | 2009-01-09 16:27:48 +0000 |
commit | 5e0a47a2382b58e15336a742017a57e24611375f (patch) | |
tree | 1dc7562d25f4309b766565ee82d1e61ef1c3c757 /tests/libcgrouptest.h | |
parent | 216ef3fa583b751c3f76f8812f947fe3b61c58d9 (diff) | |
download | libcg-5e0a47a2382b58e15336a742017a57e24611375f.tar.gz libcg-5e0a47a2382b58e15336a742017a57e24611375f.tar.xz libcg-5e0a47a2382b58e15336a742017a57e24611375f.zip |
libcgrouptest: let check_task() receive a pid as argument
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
The patch would get a reject because of modifications in an earlier
patch. Hence updating the patch by fixing the reject.
This patch makes the function check_task() capable of checking if a pid
other than the calling process is attached to a particlular group. Earlier
it was checking for the calling process only.
For optimization purpose 0 is used to indicate that the task to be attached
is the current task and hence call cgroup_gettid() only once.
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@311 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests/libcgrouptest.h')
-rw-r--r-- | tests/libcgrouptest.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libcgrouptest.h b/tests/libcgrouptest.h index 36edc26..00765bd 100644 --- a/tests/libcgrouptest.h +++ b/tests/libcgrouptest.h @@ -138,7 +138,7 @@ struct cgroup *new_cgroup(char *group, char *controller_name, char *control_file, int value_type, struct cntl_val_t cval, struct uid_gid_t ids, int i); int check_fsmounted(int multimnt); -int check_task(char *tasksfile); +int check_task(char *tasksfile, pid_t pid); /* function to print messages in better format */ void message(int num, int pass, const char *api, int ret, char *extra); |