mirror of https://github.com/mkerrisk/man-pages
getpid.2: Mention that PID == TGID, and note contrast with TID
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
80b435e1ba
commit
57c80845d0
|
@ -59,6 +59,18 @@ If the caller's parent is in a different PID namespace (see
|
||||||
.BR pid_namespaces (7)),
|
.BR pid_namespaces (7)),
|
||||||
.BR getppid ()
|
.BR getppid ()
|
||||||
returns 0.
|
returns 0.
|
||||||
|
.PP
|
||||||
|
From a kernel perspective,
|
||||||
|
the PID (which is shared by all of the threads in a multithreaded process)
|
||||||
|
is sometimes also known as the thread group ID (TGID).
|
||||||
|
This contrasts with the kernel thread ID (TID),
|
||||||
|
which is unique for each thread.
|
||||||
|
For further details, see
|
||||||
|
.BR gettid (2)
|
||||||
|
and the discussion of the
|
||||||
|
.BR CLONE_THREAD
|
||||||
|
flag in
|
||||||
|
.BR clone (2).
|
||||||
.\"
|
.\"
|
||||||
.SS C library/kernel differences
|
.SS C library/kernel differences
|
||||||
From glibc version 2.3.4 up to and including version 2.24,
|
From glibc version 2.3.4 up to and including version 2.24,
|
||||||
|
|
Loading…
Reference in New Issue