How do I determine if a detached pthread is alive?
For a joinable (i.e NOT detached) pthread you could use pthread_kill like this: int ret = pthread_kill(YOUR_PTHREAD_ID, 0); If you get a ESRCH value, it might be the case that your thread is dead. However this doesn’t apply to a detached pthreads because after it has ended its thread ID can be reused for another … Read more