aboutsummaryrefslogtreecommitdiffstats
path: root/man7/pthreads.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2015-05-05 21:11:59 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2015-05-05 21:11:59 +0200
commitccbcc0aeed1b69d5eaedd768f3d29cebfb42964d (patch)
treeb87879bc95e46660b24d923e5f4947c083a9d1d1 /man7/pthreads.7
parent0ad13546b4620a86dd1c595f39dca4aa8538fbb9 (diff)
downloadman-pages-ccbcc0aeed1b69d5eaedd768f3d29cebfb42964d.tar.gz
pthreads.7: Using thread IDs whose lifetime has expired gives undefined behavior
See https://bugzilla.kernel.org/show_bug.cgi?id=53061 Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/pthreads.7')
-rw-r--r--man7/pthreads.74
1 files changed, 3 insertions, 1 deletions
diff --git a/man7/pthreads.7 b/man7/pthreads.7
index 98eb861870..906b5a08cf 100644
--- a/man7/pthreads.7
+++ b/man7/pthreads.7
@@ -127,8 +127,10 @@ Thread IDs are guaranteed to be unique only within a process.
that ID by definition refers to a thread in
the same process as the caller.)
-A thread ID may be reused after a terminated thread has been joined,
+The system may reuse a thread ID after a terminated thread has been joined,
or a detached thread has terminated.
+POSIX says: "If an application attempts to use a thread ID whose
+lifetime has ended, the behavior is undefined."
.SS Thread-safe functions
A thread-safe function is one that can be safely
(i.e., it will deliver the same results regardless of whether it is)