]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
proc.5, proc_pid_task.5, proc_tid.5, proc_thread-self.5: Split /proc/PID/task/ (and...
authorAlejandro Colomar <alx@kernel.org>
Tue, 15 Aug 2023 12:56:41 +0000 (14:56 +0200)
committerAlejandro Colomar <alx@kernel.org>
Tue, 15 Aug 2023 21:13:46 +0000 (23:13 +0200)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man5/proc.5
man5/proc_pid_task.5 [new file with mode: 0644]
man5/proc_thread-self.5 [new file with mode: 0644]
man5/proc_tid.5 [new file with mode: 0644]

index 720bbb2bdad85254093c42f7154e396ea14526cc..05543fb60017bbb4ee2037e49f63a91dabe65c0f 100644 (file)
@@ -231,50 +231,6 @@ hierarchy.
 .\"       Added in Linux 2.6.9
 .\"       CONFIG_SCHEDSTATS
 .TP
-.IR /proc/ pid /task " (since Linux 2.6.0)"
-.\" Precisely: Linux 2.6.0-test6
-This is a directory that contains one subdirectory
-for each thread in the process.
-The name of each subdirectory is the numerical thread ID
-.RI ( tid )
-of the thread (see
-.BR gettid (2)).
-.IP
-Within each of these subdirectories, there is a set of
-files with the same names and contents as under the
-.IR /proc/ pid
-directories.
-For attributes that are shared by all threads, the contents for
-each of the files under the
-.IR task/ tid
-subdirectories will be the same as in the corresponding
-file in the parent
-.IR /proc/ pid
-directory
-(e.g., in a multithreaded process, all of the
-.IR task/ tid /cwd
-files will have the same value as the
-.IR /proc/ pid /cwd
-file in the parent directory, since all of the threads in a process
-share a working directory).
-For attributes that are distinct for each thread,
-the corresponding files under
-.IR task/ tid
-may have different values (e.g., various fields in each of the
-.IR task/ tid /status
-files may be different for each thread),
-.\" in particular: "children" :/
-or they might not exist in
-.IR /proc/ pid
-at all.
-.IP
-.\" The following was still true as at kernel 2.6.13
-In a multithreaded process, the contents of the
-.IR /proc/ pid /task
-directory are not available if the main thread has already terminated
-(typically by calling
-.BR pthread_exit (3)).
-.TP
 .IR /proc/ pid /task/ tid /children " (since Linux 3.5)"
 .\" commit 818411616baf46ceba0cff6f05af3a9b294734f7
 A space-separated list of child tasks of this task.
@@ -300,36 +256,6 @@ it is governed by the
 .B CONFIG_PROC_CHILDREN
 option.
 .TP
-.IR /proc/ tid
-There  is a numerical subdirectory for each running thread
-that is not a thread group leader
-(i.e., a thread whose thread ID is not the same as its process ID);
-the subdirectory is named by the thread ID.
-Each one of these subdirectories contains files and subdirectories
-exposing information about the thread with the thread ID
-.IR tid .
-The contents of these directories are the same as the corresponding
-.IR /proc/ pid /task/ tid
-directories.
-.IP
-The
-.IR /proc/ tid
-subdirectories are
-.I not
-visible when iterating through
-.I /proc
-with
-.BR getdents (2)
-(and thus are
-.I not
-visible when one uses
-.BR ls (1)
-to view the contents of
-.IR /proc ).
-However, the pathnames of these directories are visible to
-(i.e., usable as arguments in)
-system calls that operate on pathnames.
-.TP
 .I /proc/apm
 Advanced power management version and battery information when
 .B CONFIG_APM
@@ -3021,17 +2947,6 @@ for easy understanding.
 .BR sysvipc (7)
 provides further background on the information shown by these files.
 .TP
-.IR /proc/thread\-self " (since Linux 3.17)"
-.\" commit 0097875bd41528922fb3bb5f348c53f17e00e2fd
-This directory refers to the thread accessing the
-.I /proc
-filesystem,
-and is identical to the
-.IR /proc/self/task/ tid
-directory named by the process thread ID
-.RI ( tid )
-of the same thread.
-.TP
 .IR /proc/timer_list " (since Linux 2.6.21)"
 .\" commit 289f480af87e45f7a6de6ba9b4c061c2e259fe98
 This read-only file exposes a list of all currently pending
diff --git a/man5/proc_pid_task.5 b/man5/proc_pid_task.5
new file mode 100644 (file)
index 0000000..8081917
--- /dev/null
@@ -0,0 +1,97 @@
+.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
+.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
+.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
+.\"
+.\" SPDX-License-Identifier: GPL-3.0-or-later
+.\"
+.TH proc_pid_task 5 (date) "Linux man-pages (unreleased)"
+.SH NAME
+/proc/pid/task/, /proc/tid/, /proc/thread\-self/ \- thread information
+.SH DESCRIPTION
+.TP
+.IR /proc/ pid /task/ " (since Linux 2.6.0)"
+.\" Precisely: Linux 2.6.0-test6
+This is a directory that contains one subdirectory
+for each thread in the process.
+The name of each subdirectory is the numerical thread ID
+.RI ( tid )
+of the thread (see
+.BR gettid (2)).
+.IP
+Within each of these subdirectories, there is a set of
+files with the same names and contents as under the
+.IR /proc/ pid
+directories.
+For attributes that are shared by all threads, the contents for
+each of the files under the
+.IR task/ tid
+subdirectories will be the same as in the corresponding
+file in the parent
+.IR /proc/ pid
+directory
+(e.g., in a multithreaded process, all of the
+.IR task/ tid /cwd
+files will have the same value as the
+.IR /proc/ pid /cwd
+file in the parent directory, since all of the threads in a process
+share a working directory).
+For attributes that are distinct for each thread,
+the corresponding files under
+.IR task/ tid
+may have different values (e.g., various fields in each of the
+.IR task/ tid /status
+files may be different for each thread),
+.\" in particular: "children" :/
+or they might not exist in
+.IR /proc/ pid
+at all.
+.IP
+.\" The following was still true as at kernel 2.6.13
+In a multithreaded process, the contents of the
+.IR /proc/ pid /task
+directory are not available if the main thread has already terminated
+(typically by calling
+.BR pthread_exit (3)).
+.TP
+.IR /proc/ tid /
+There  is a numerical subdirectory for each running thread
+that is not a thread group leader
+(i.e., a thread whose thread ID is not the same as its process ID);
+the subdirectory is named by the thread ID.
+Each one of these subdirectories contains files and subdirectories
+exposing information about the thread with the thread ID
+.IR tid .
+The contents of these directories are the same as the corresponding
+.IR /proc/ pid /task/ tid
+directories.
+.IP
+The
+.IR /proc/ tid
+subdirectories are
+.I not
+visible when iterating through
+.I /proc
+with
+.BR getdents (2)
+(and thus are
+.I not
+visible when one uses
+.BR ls (1)
+to view the contents of
+.IR /proc ).
+However, the pathnames of these directories are visible to
+(i.e., usable as arguments in)
+system calls that operate on pathnames.
+.TP
+.IR /proc/thread\-self/ " (since Linux 3.17)"
+.\" commit 0097875bd41528922fb3bb5f348c53f17e00e2fd
+This directory refers to the thread accessing the
+.I /proc
+filesystem,
+and is identical to the
+.IR /proc/self/task/ tid
+directory named by the process thread ID
+.RI ( tid )
+of the same thread.
+.SH SEE ALSO
+.BR proc (5)
diff --git a/man5/proc_thread-self.5 b/man5/proc_thread-self.5
new file mode 100644 (file)
index 0000000..2c760e9
--- /dev/null
@@ -0,0 +1 @@
+.so man5/proc_pid_task.5
diff --git a/man5/proc_tid.5 b/man5/proc_tid.5
new file mode 100644 (file)
index 0000000..2c760e9
--- /dev/null
@@ -0,0 +1 @@
+.so man5/proc_pid_task.5