From 5aaf1385fb9f78cf7503232d3027c86955ba7608 Mon Sep 17 00:00:00 2001 From: Dave Martin Date: Tue, 12 May 2020 17:36:48 +0100 Subject: [PATCH] prctl.2: Fix mis-description of thread ID values in procfs Under PR_SET_NAME, the [tid] value seen in procfs as /proc/self/task/[tid] is mistakenly described as the name of the thread, whereas really the name is on /proc/self/task/[tid]/comm. Fix it. Signed-off-by: Dave Martin Signed-off-by: Michael Kerrisk --- man2/prctl.2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man2/prctl.2 b/man2/prctl.2 index 67b3f17ec..314c09cd1 100644 --- a/man2/prctl.2 +++ b/man2/prctl.2 @@ -803,8 +803,10 @@ and retrieved using The attribute is likewise accessible via .IR /proc/self/task/[tid]/comm , where -.I tid -is the name of the calling thread. +.I [tid] +is the the thread ID of the calling thread, as returned by +.BR gettid (2). +.\" prctl PR_GET_NAME .TP .BR PR_GET_NAME " (since Linux 2.6.11)" Return the name of the calling thread,