summaryrefslogtreecommitdiffstats
path: root/man3/pthread_join.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man3/pthread_join.3
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3/pthread_join.3')
-rw-r--r--man3/pthread_join.317
1 files changed, 8 insertions, 9 deletions
diff --git a/man3/pthread_join.3 b/man3/pthread_join.3
index 9284d85..f063a79 100644
--- a/man3/pthread_join.3
+++ b/man3/pthread_join.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_join 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH pthread_join 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
pthread_join \- join with a terminated thread
.SH LIBRARY
@@ -13,7 +13,7 @@ POSIX threads library
.SH SYNOPSIS
.nf
.B #include <pthread.h>
-.PP
+.P
.BI "int pthread_join(pthread_t " thread ", void **" retval );
.fi
.SH DESCRIPTION
@@ -28,7 +28,7 @@ returns immediately.
The thread specified by
.I thread
must be joinable.
-.PP
+.P
If
.I retval
is not NULL, then
@@ -42,7 +42,7 @@ If the target thread was canceled, then
.B PTHREAD_CANCELED
is placed in the location pointed to by
.IR retval .
-.PP
+.P
If multiple threads simultaneously try to join with the same thread,
the results are undefined.
If the thread calling
@@ -91,7 +91,6 @@ T{
.BR pthread_join ()
T} Thread safety MT-Safe
.TE
-.sp 1
.SH STANDARDS
POSIX.1-2008.
.SH HISTORY
@@ -103,10 +102,10 @@ the caller is guaranteed that the target thread has terminated.
The caller may then choose to do any clean-up that is required
after termination of the thread (e.g., freeing memory or other
resources that were allocated to the target thread).
-.PP
+.P
Joining with a thread that has previously been joined results in
undefined behavior.
-.PP
+.P
Failure to join with a thread that is joinable
(i.e., one that is not detached),
produces a "zombie thread".
@@ -114,13 +113,13 @@ Avoid doing this,
since each zombie thread consumes some system resources,
and when enough zombie threads have accumulated,
it will no longer be possible to create new threads (or processes).
-.PP
+.P
There is no pthreads analog of
.IR "waitpid(\-1,\ &status,\ 0)" ,
that is, "join with any terminated thread".
If you believe you need this functionality,
you probably need to rethink your application design.
-.PP
+.P
All of the threads in a process are peers:
any thread can join with any other thread in the process.
.SH EXAMPLES