In linux, when a process is running, it call pthread_create. This will cause the process to generate a thread with the same PID, but different thread group ID. How can I query the thread group ID of this new thread?
NOTE: I cannot read it by adding some logging from the source code. Is there anything on the system that I can read to get those information? E.g., some where in /proc?