From 9a6ff5bc53dedbaa601a1a76cbaf8a76afd60c9f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:06 +0200 Subject: Adding upstream version 6.7. Signed-off-by: Daniel Baumann --- man3/pthread_join.3 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'man3/pthread_join.3') 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 -.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 -- cgit v1.2.3