Subj : Linux NPTL anomally To : comp.programming.threads From : dmarkh Date : Wed Sep 28 2005 02:51 am I'm not sure this is the proper place to ask about this but since the anomally I see does not happen when I build and run my app using LinuxThreads (export LD_ASSUME_KERNEL=2.4.10), I figure it's better here than the kernel list. I have a multi threaded app. The app is running and all the threads have started and are sleeping. The main process calls a function in a kernel module that among other things, registers the main processes pid via "pid = current->pid". Later at program exit time, the main sequentially causes all the threads to exit. Then in during some cleanup code, calls another function in that same kernel module and again registers his process id via "pid = current->pid". The anomally is, this last "current->pid" does not have the main process id. It has the tid of one of my threads that has long since exited. Not only have all my threads exited, none of them calls or has called any function within in this kernel module. ???? I understand (sort of) the differences between LinuxThreads and NTPL but they do not explain this anomally. Bug?? Thanks Mark .