Subj : Re: list of all threads( pthread_t's ) in process To : comp.programming.threads From : Joe Seigh Date : Tue Sep 27 2005 10:34 am shex wrote: > I know siblings are alive, but i don't have thier's ids. > I didn't create them, we share the same father. > I want them to do something, print their stack trace in my case. so i > want to signal them, i'll be writting the signal handler method of > course. the only thing missing is their ids. > Can you sugguest another idea for execution the job (i'm looking for a > solution to work on linux\aix)? > Yes, use the pstack command. I think it's available on both systems. Accessing that kind of information directly is done through the proc pseudo filesystem which is platform dependent if it exists at all. You'll find different information on different platforms. The thread ids in proc are the kernel ids and don't necessarily correspond to pthread ids. You need to find a mechanism to translate from one to the other. For linux, it's the gettid syscall and it's just a kernel thread id version of pthread_self() IIRC. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .