From: Li Zefan Document that a pid of zero(0) can be used to refer to the current task when attaching a task to a cgroup, as in the following usage: # echo 0 > /dev/cgroup/tasks This is consistent with existing cpuset behavior. Signed-off-by: Li Zefan Acked-by: Paul Jackson Acked-by: Dhaval Giani Cc: Paul Menage Cc: Balbir Singh Signed-off-by: Andrew Morton --- Documentation/cgroups.txt | 4 ++++ 1 file changed, 4 insertions(+) diff -puN Documentation/cgroups.txt~cgroups-document-the-effect-of-attaching-pid-0-to-a-cgroup Documentation/cgroups.txt --- a/Documentation/cgroups.txt~cgroups-document-the-effect-of-attaching-pid-0-to-a-cgroup +++ a/Documentation/cgroups.txt @@ -390,6 +390,10 @@ If you have several tasks to attach, you ... # /bin/echo PIDn > tasks +You can attach the current task by echoing 0: + +# /bin/echo 0 > tasks + 3. Kernel API ============= _