Subj : Re: I write a multithread program with pthread, and meet a program To : comp.programming.threads From : Loic Domaigne Date : Mon Apr 11 2005 09:37 pm Hello, > But I am still surprised that the new thread can not be stopped > correctly. You still didn't told us which Pthreads implementation you are using. LinuxThreads or NPTL? Does the effect subsists when doing the following export before running the program? bash$ export LD_ASSUME_KERNEL=2.4.19 > cout may be a cancellation point or not. > Theoritically, if cout is not a cancellation point, the new thread will > continue to run when the main thread call pthread_cancel(); if it is > cancellation point, the new thread will be stopped. > But as a matter of fact, the new thread does not run and is not > stopped. In linux, the new thread will be a zombie. > What I want to know is why. It's only a theory at that point... But it looks like a bug in the libstdc++ or the libpthread, when a thread is being cancelled while writting on cout. Regards, Loic. .