]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/getpid.2
Removed trailing white space at end of lines
[thirdparty/man-pages.git] / man2 / getpid.2
index e6c4d96fa5a31fc21792f0901eafde6760295a18..24f74dfe9c4ef2d4ed8267efcb4663b1ebd989e7 100644 (file)
@@ -22,7 +22,7 @@
 .\" the source, must acknowledge the copyright and authors of this work.
 .\" %%%LICENSE_END
 .\"
-.TH GETPID 2 2017-05-03 "Linux" "Linux Programmer's Manual"
+.TH GETPID 2 2019-03-06 "Linux" "Linux Programmer's Manual"
 .SH NAME
 getpid, getppid \- get process identification
 .SH SYNOPSIS
@@ -59,6 +59,18 @@ If the caller's parent is in a different PID namespace (see
 .BR pid_namespaces (7)),
 .BR getppid ()
 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
 From glibc version 2.3.4 up to and including version 2.24,
@@ -124,6 +136,22 @@ calls to
 always invoke the actual system call, rather than returning a cached value.
 .\" FIXME .
 .\" Review progress of https://bugzilla.redhat.com/show_bug.cgi?id=1469757
+.PP
+On Alpha, instead of a pair of
+.BR getpid ()
+and
+.BR getppid ()
+system calls, a single
+.BR getxpid ()
+system call is provided, which returns a pair of PID and parent PID.
+The glibc
+.BR getpid ()
+and
+.BR getppid ()
+wrapper functions transparently deal with this.
+See
+.BR syscall (2)
+for details regarding register mapping.
 .SH SEE ALSO
 .BR clone (2),
 .BR fork (2),