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
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.)