428 Subj : Re: problem with pthread_kill To : comp.programming.threads From : David Schwartz Date : Fri Jul 15 2005 07:21 pm wrote in message news:1121470547.536779.318310@g14g2000cwa.googlegroups.com... >Hello, I´m 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 You need to keep track of it yourself. What's your real problem? There is no reason you should care whether a thread is alive or not unless you are managing the lifetime of that thread, in which case you would already know. DS . 0