Obtaining the "ps ax" pid from a thread?
From: Timur Tabi (nospam_timur_at_tabi.org)
Date: 03/26/04
- Previous message: Chris Cox: "A bug in resolver (getaddrinfo)?? Unqualified lookups"
- Next in thread: Gil Hamilton: "Re: Obtaining the "ps ax" pid from a thread?"
- Reply: Gil Hamilton: "Re: Obtaining the "ps ax" pid from a thread?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Mar 2004 13:48:16 -0800
When I call pthread_create(), I get a new thread and a thread ID, TID.
When I issue the "ps ax" command from the shell, I see a bunch of
copies of my application, each with its own PID. The TID and PID are
not the same, so I can't tell which entry from the "ps" command
matches which thread I created.
How can I obtain, in my threads, the numeric value displayed by "ps"?
- Previous message: Chris Cox: "A bug in resolver (getaddrinfo)?? Unqualified lookups"
- Next in thread: Gil Hamilton: "Re: Obtaining the "ps ax" pid from a thread?"
- Reply: Gil Hamilton: "Re: Obtaining the "ps ax" pid from a thread?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|