I\'m a little confused about clean-up order when you\'re using PThreads with regard to cancellation. Normally, if your thread is detached, it automatically cleans up when i
From man pthread_join
:
After a canceled thread has terminated, a join with that thread using pthread_join(3) obtains PTHREAD_CANCELED as the thread's exit status. (Joining with a thread is the only way to know that cancellation has completed.)
It seems that joining is not necessary for execution it is necessary if you want know what you did actually succeed.