Multiple PIDs for a multithreaded program

Mike Frysinger vapier at gentoo.org
Mon May 4 21:10:02 UTC 2009


On Monday 04 May 2009 12:09:18 Cathey, Jim wrote:
> Depends on whether you're using Linux threads,
> or the NPTL (?).  The older package gives them
> separate PID's, the newer does not.  In other
> words, it depends on your libc configuration.
> (They both get ID's like pids, but the tids
> are somehow marked to not show up in ps, etc.
> with the newer library.)

the Linuxthreads implementation does result in different pids at the kernel 
level, but NPTL does not.  both result in different tids.

there is no special handling with tids.  the /proc/ listing shows only unique 
pids while /proc/<pid>/task/ shows all tids for that pid.

since uClibc only ships with linuxthreads atm, it'll behave exactly the same 
as older glibc versions.  this is also useful for people who arent running 
linux-2.6 as that is required for NPTL.

> Nothing to do with BB, certainly.

correct
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090504/9b0dc82d/attachment.pgp>


More information about the busybox mailing list