If I don’t care about the return status of my thread, would I need to have a pthread_exit?
I’m wondering if there might be some subtle resource problems associated with not calling pthread_exit in my datached pthreads.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t have to call
pthread_exit(). Returning from the thread function would work equally well, and will not leak any resources (of course, you still have to ensure that your code doesn’t have any leaks).