mirror of https://github.com/mkerrisk/man-pages
pid_namespaces.7: readlink(2) on /proc/self gives the caller's PID in the pidns of /proc
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
6e377abf9c
commit
6c3db75479
|
@ -234,6 +234,13 @@ then it isn't necessary to change the root directory:
|
|||
a new procfs instance can be mounted directly over
|
||||
.IR /proc .)
|
||||
|
||||
Calling
|
||||
.BR readlink (2)
|
||||
on the path
|
||||
.I /proc/self
|
||||
yields the process ID of the caller in the PID namespace of the procfs mount
|
||||
(i.e., the PID namespace of the process that mounted the procfs).
|
||||
|
||||
When a process ID is passed over a UNIX domain socket to a
|
||||
process in a different PID namespace (see the description of
|
||||
.B SCM_CREDENTIALS
|
||||
|
|
Loading…
Reference in New Issue