
I have been investigating this and can't seem to find a solution. I have a many threaded app that starts threads with pthread_create. I can see them in "ps -eLf", and I can strace each individual thread. UID PID PPID LWP C NLWP STIME TTY TIME CMD roger 27912 22887 27912 93 12 13:45 pts/1 00:03:29 hiway roger 27912 22887 28372 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28373 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28374 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28375 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28376 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28377 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28378 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28379 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28380 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28381 0 12 13:45 pts/1 00:00:00 hiway roger 27912 22887 28382 84 12 13:45 pts/1 00:03:06 hiway What I cannot do is have the thread list it's process id (LWP in the list above). getpid() returns the pid of the initial process that started the thread, as is in the PID column. How can I get the value in the LWP column in the running thread itself? -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org