Subj : Re: atexit handler: pthread_cancel, pthread_testcancel, pthread_join problem To : comp.programming.threads From : annamalai.gurusami Date : Thu Aug 18 2005 12:21 pm loic-dev@gmx.net wrote: > I share Joe's opinion here. It doesn't make a lot of sense to register > an atexit handler that cancels the thread. The function exit() does > just that. Does this suggest that exit() will do a pthread_cancel() for other threads running? For example, if I have a thread whose start routine is void* start_thread(void* something) { for(;;) { // lengthy operation A pthread_testcancel(); // op. B // lengthy op. C } } If I don't call pthread_cancel() explicitly for the above thread, will the above thread still get cancelled only at operation B? Rgds, anna .