Re: Kernel process exit problem

Arend-jan Wytzes <[email protected]>
Newsgroups gmane.linux.ngpt.devel
Message-ID <[email protected]>
> > Hi again, 
> > 
> > The current kernel patch introduces a problem with process-exit handeling
> > for threaded processes that exit due to a signal.
> 
> Do you mean that patch fragment? This is out of ngpt-2.4.19-pre1.diff

Nope, that's not it. It's the patch that fixes the re-parenting of a process
that's about to exit. The bug was in the section of forget_original_parent()
that could erronously select a thread from the threadgroup as a suitable reaper,
while that thread had in fact allready done do_exit() itself:

-       /* Next in our thread group */
-       reaper = next_thread(father);
+       /* Next in our thread group, if they're not already exiting */
+       reaper = father;
+       do {
+               reaper = next_thread(reaper);
+               if (!(reaper->flags & PF_EXITING))
+                       break;
+       } while (reaper != father);
+


Regards,
aj
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.