Skip to content

Commit bef67c5

Browse files
Li Zefantorvalds
Li Zefan
authored andcommitted
cgroups: document the effect of attaching PID 0 to a cgroup
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 <lizf@cn.fujitsu.com> Acked-by: Paul Jackson <pj@sgi.com> Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Cc: Paul Menage <menage@google.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Andrea Righi <righi.andrea@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4e0d13c commit bef67c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Documentation/cgroups.txt

+4
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,10 @@ If you have several tasks to attach, you have to do it one after another:
390390
...
391391
# /bin/echo PIDn > tasks
392392

393+
You can attach the current shell task by echoing 0:
394+
395+
# echo 0 > tasks
396+
393397
3. Kernel API
394398
=============
395399

0 commit comments

Comments
 (0)