Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_join(3) [osx man page]

PTHREAD_JOIN(3) 					   BSD Library Functions Manual 					   PTHREAD_JOIN(3)

NAME
pthread_join -- wait for thread termination SYNOPSIS
#include <pthread.h> int pthread_join(pthread_t thread, void **value_ptr); DESCRIPTION
The pthread_join() function suspends execution of the calling thread until the target thread terminates, unless the target thread has already terminated. On return from a successful pthread_join() call with a non-NULL value_ptr argument, the value passed to pthread_exit() by the terminating thread is stored in the location referenced by value_ptr. When a pthread_join() returns successfully, the target thread has been terminated. The results of multiple simultaneous calls to pthread_join(), specifying the same target thread, are undefined. If the thread calling pthread_join() is cancelled, the target thread is not detached. RETURN VALUES
If successful, the pthread_join() function will return zero. Otherwise, an error number will be returned to indicate the error. ERRORS
pthread_join() will fail if: [EDEADLK] A deadlock was detected or the value of thread specifies the calling thread. [EINVAL] The implementation has detected that the value specified by thread does not refer to a joinable thread. [ESRCH] No thread could be found corresponding to that specified by the given thread ID, thread. SEE ALSO
wait(2), pthread_create(3) STANDARDS
pthread_join() conforms to ISO/IEC 9945-1:1996 (``POSIX.1''). BSD
April 4, 1996 BSD

Check Out this Related Man Page

PTHREAD_JOIN(3) 					   BSD Library Functions Manual 					   PTHREAD_JOIN(3)

NAME
pthread_join -- wait for thread termination SYNOPSIS
#include <pthread.h> int pthread_join(pthread_t thread, void **value_ptr); DESCRIPTION
The pthread_join() function suspends execution of the calling thread until the target thread terminates unless the target thread has already terminated. On return from a successful pthread_join() call with a non-NULL value_ptr argument, the value passed to pthread_exit() by the terminating thread is stored in the location referenced by value_ptr. When a pthread_join() returns successfully, the target thread has been terminated. The results of multiple simultaneous calls to pthread_join() specifying the same target thread are undefined. If the thread calling pthread_join() is cancelled, then the target thread is not detached. RETURN VALUES
If successful, the pthread_join() function will return zero. Otherwise, an error number will be returned to indicate the error. ERRORS
The pthread_join() function will fail if: [EINVAL] The implementation has detected that the value specified by thread does not refer to a joinable thread. [ESRCH] No thread could be found corresponding to that specified by the given thread ID, thread. [EDEADLK] A deadlock was detected or the value of thread specifies the calling thread. SEE ALSO
wait(2), pthread_create(3) STANDARDS
The pthread_join() function conforms to ISO/IEC 9945-1:1996 (``POSIX.1''). BSD
January 23, 2010 BSD
Man Page

13 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Any backdoors?

Hello All: I left an important file on my computer in Montana (I'm in Arizona). It is running Mac OS 10.2.7. For some reason it appears file sharing is off, I don't understand how that happened because I have logged in remotely before. Can someone please tell me if there is any way to use... (7 Replies)
Discussion started by: jellegard
7 Replies

2. UNIX for Advanced & Expert Users

Automate FTP

Hi all, I got this piece of code in this forum and I can't seem to get it work. The thread already closed so I just post a new thread. #!/usr/bin/ksh ftp -v -n "YOUR.IP.ADD.RESS" << cmd user "user" "passwd" cd /distant/directory lcd /local/directoryget ssh_install get ( or put) your... (4 Replies)
Discussion started by: CamTu
4 Replies

3. Post Here to Contact Site Administrators and Moderators

how gollum answered..

Dear admins, i remember, my first thread, it is regarding unix systems and i asked some suggestions... and i like to know how gollum answered for that thread?.. and is gollum is a program?.. (5 Replies)
Discussion started by: sekar sundaram
5 Replies

4. Shell Programming and Scripting

More log manipulation

wasn't sure if this should have a new thread since I'm still working on the same job I asked a question about earlier. But it's a different problem/question so I guess it deserves a new thread.... I have a log with roughly 10000 lines in it, each one has a timestamp. The problem is, the time... (8 Replies)
Discussion started by: StevePace
8 Replies

5. Post Here to Contact Site Administrators and Moderators

How to Delete a Post

Hi, I have created a new thread. I dont need that thread now. How should I delete it? Nobody has replied yet. Regd, M (5 Replies)
Discussion started by: mahatma
5 Replies

6. Shell Programming and Scripting

Cron Jobs for FTP download

Dear All, Please to be inform you,I have posted one thread on this forum last 5 days back. I was not getting suggestions for my thread. So i am creating a new thread with detailed of my R&D. I am new in Shell Scripts, Perl and Cron Jobs. I have one requirement in Cron jobs for FTP Download.... (5 Replies)
Discussion started by: moorthygs
5 Replies

7. Shell Programming and Scripting

Stripping out extensions when file has multiple dots in name

I posted this already in another thread, but was told that I should create a seperate thread for the following question: How do I strip the extension when the delimiter might occur multiple times in the filename? For example: I have 2 files as input for my script. test.extension... (8 Replies)
Discussion started by: Nemelis
8 Replies

8. Programming

Doubt on pthread_exit and pthread_join

Main function creates Thread0 and Thread1 by using pthread_create systemcall. In Thread0() { we are calling pthread_exit(0) ; } and in Thread1() { status= pthread_join(tid,NULL); sprintf(ebuf,"timer6: can't join with thread0, status: %d",status); Assert(status==0,ebuf); } ... (4 Replies)
Discussion started by: mansa
4 Replies

9. Shell Programming and Scripting

Problem in quitting/exiting from sqlplus

Hello, This is my first post and I would be very thankful if you can help me. I've already searched in the forum and I've found a very similar thread in wich my problem is solved, but the thread is closed and the solution given in it doesn't work in my shell: 153194-problem-quitting-sqlplus ... (11 Replies)
Discussion started by: JuanPerez
11 Replies

10. Post Here to Contact Site Administrators and Moderators

Remove this thread

Please remove this thread. https://www.unix.com/homework-coursework-questions/207877-shell-script-beginner.html#post302735171 (4 Replies)
Discussion started by: spider-man
4 Replies

11. UNIX for Beginners Questions & Answers

Finding and renaming files with exceptions

Hello all, I am a new ubuntu user (have to use it for work) and I am trying to learn and familiarize myself with commands that I will be using frequently. I would like some help in how I can get a list of all files with certain keywords in the filename. For example, I have a directory... (8 Replies)
Discussion started by: azurite
8 Replies

12. UNIX for Beginners Questions & Answers

Extract data between two parenthesi

Thanks Ravinder for quick reply.Thats work. One more thing if i want to extract something based on paranthesis....can you help. Input: exp1: CREATE TABLE ( A, B, C ) o/p exp1: A, B, C exp2: (7 Replies)
Discussion started by: raju2016
7 Replies

13. Emergency UNIX and Linux Support

How do i start a new thread with my android phone?

thanks (6 Replies)
Discussion started by: jgt
6 Replies