diff options
| author | Alejandro Colomar <alx@kernel.org> | 2023-08-15 14:56:41 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-08-15 23:13:46 +0200 |
| commit | bc9d53da8c684d44fb0c1e20cf813eaad6b9629d (patch) | |
| tree | a98bc7bf021ff37e2c098946a3b1d40edcd92840 | |
| parent | 68553d3f22ffb0bfa69032134b28e7b010cae86a (diff) | |
| download | man-pages-bc9d53da8c684d44fb0c1e20cf813eaad6b9629d.tar.gz | |
proc.5, proc_pid_task.5, proc_tid.5, proc_thread-self.5: Split /proc/PID/task/ (and /proc/TID/, /proc/thread-self/) from proc(5)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man5/proc.5 | 85 | ||||
| -rw-r--r-- | man5/proc_pid_task.5 | 97 | ||||
| -rw-r--r-- | man5/proc_thread-self.5 | 1 | ||||
| -rw-r--r-- | man5/proc_tid.5 | 1 |
4 files changed, 99 insertions, 85 deletions
diff --git a/man5/proc.5 b/man5/proc.5 index 720bbb2bda..05543fb600 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -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 index 0000000000..8081917759 --- /dev/null +++ b/man5/proc_pid_task.5 @@ -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 index 0000000000..2c760e97e8 --- /dev/null +++ b/man5/proc_thread-self.5 @@ -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 index 0000000000..2c760e97e8 --- /dev/null +++ b/man5/proc_tid.5 @@ -0,0 +1 @@ +.so man5/proc_pid_task.5 |
