On Sun, Jan 2, 2011 at 7:46 PM, Nicholas Clark <nick@ccl4.org> wrote: > I had wondered if this was something to do with "THREADS_HAVE_PIDS" > (IIRC something to do with fun Linux threading models) but git blame seems > to suggest that this caching dates back to 5.000 I think you're refering to "LinuxThreads", the threading implementation that preceded NTPL. It violated POSIX in various ways and I don't think anyone still uses it on modern systems (NTPL has been out since 2003), but there are probably still older systems (pre-2.6) out there that use it. > But I'm not sure whether taking it out would affect things under the "fun" > threading models. Given that "THREADS_HAVE_PIDS" works to ensure that the > parent process ID doesn't change unexpectedly, does this mean that getpid() > on those threading models gives a different answer in different threads? Yeah, LinuxThreads did exactly that. Consult your pthreads(7) man page if you happen to be running Linux. LeonThread Previous | Thread Next