Subj : problem with pthread_kill To : comp.programming.threads From : martinacevedo Date : Fri Jul 15 2005 05:35 pm Hello, I=B4m implementing an multithread application under linux with gcc and kdevelop. I use pthread library from linux to handle threads and mutex. My question is how can my program detect if a thread struct is still valid or active.... I use a library that call a function pthread_kill (threadID,0) in order to detect if a thread is alive but when the thread is invalid(I thinks is invalid), it causes a segmentation fault, the program runs on mandriva linux xeon p4 dual processor. there is another function that can detect the validity of the struct Ex: if (threadID=3D=3D0) return FALSE; if (pthread_kill(threadID,0)!=3D0) //<< Program crashes { ..=2E... return TRUE;=20 }=20 else=20 {=20 ..=2E....=20 return FALSE;=20 }=20 Thanks .