Sripathi Kodi wrote: > Can you test this patch please? > >> -- >> Regards Klaus > > > Hi Klaus, > > I have tested your patch against my testcase and it seems to be alright. > > My testcase is right here in my first post on LKML about this: > http://lkml.org/lkml/2004/11/5/34! The essence of the testcase is two > threads racing in waitpid to collect the exit status of a child. > Sometimes the thread that loses this race gets stuck in waitpid > forever unless manually interrupted. I had been able to recreate this > problem only on a multiprocessor machine. The essence of the fix was > to make the thread that loses this race not to set 'flag =1'. The > patch you sent me does not alter this behavior, so it works alright. > > Thanks and regards, > Sripathi. I encountered a bug in waitpid after Sripathi's patch was applied. See lkml "kernel reports kill too late? Thu Nov 18 2004 - 07:36:48 EST" Attached is a patch for do_wait() that may fix both problems. -- Regards Klaus