]> git.baikalelectronics.ru Git - kernel.git/commit
pid namespaces: helpers to obtain pid numbers
authorPavel Emelyanov <xemul@openvz.org>
Fri, 19 Oct 2007 06:40:06 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 18:53:39 +0000 (11:53 -0700)
commitd8b23ca128b98d034ad70159a74c734ba2bf8137
tree197f8da3e7afd65554f0c0a070eb93036b720fa8
parent1ec0e4c1f8d0f2f26d55a0c648ddd1775a382211
pid namespaces: helpers to obtain pid numbers

When showing pid to user or getting the pid numerical id for in-kernel use the
value of this id may differ depending on the namespace.

This set of helpers is used to get the global pid nr, the virtual (i.e.  seen
by task in its namespace) nr and the nr as it is seen from the specified
namespace.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/pid.h
include/linux/sched.h
kernel/pid.c