On Tue, Oct 25, 2005 at 12:05:16AM -0400, Tom Evans wrote:
> Hi All -
> 
> I finally tracked this down to the "pthread_read_children" call in the 
> "manager.c" file in linuxthreads.
> 
> For some reason, the waitpid_not_cancel in the following "while" always 
> returns 0
> and no children are "reaped": (Line 947 or so)
>  while ((pid = waitpid_not_cancel(-1, &status, WNOHANG | __WCLONE)) > 0) {
>    pthread_exited(pid);
> 
> Children are then properly "reaped" if I change it to:
>  while ((pid = wait3( &status,  WNOHANG | __WCLONE, NULL )) > 0 ) {
>    pthread_exited(pid);
> 
> I'm not sure if "wait4" (which waitpid_not_cancel uses) is broken, or 
> the INLINE_SYSCALL
> macro is somehow broken and doesn't return the correct value.
> 
> In any case, "wait3", not-inlined, works nicely for me ...  I'll leave 
> it up to the maintainers
> to determine the best patch to encompass all platforms, I'll cerainly be 
> happy for now.

Do you have a clear testcase for this problem?  I tried to reproduce
it, and could not.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to