Fix error when judging if process has children

* process.c (internal_wait): Processes counted in tcp->nclone_threads
are tcp's threads, rather than tcp's children.

Signed-off-by: Wang Chao <wang.chao@cn.fujitsu.com>
This commit is contained in:
Wang Chao 2010-08-05 14:40:45 +08:00 committed by Dmitry V. Levin
parent d322a4bbe1
commit 304ea5f067

View File

@ -1922,9 +1922,9 @@ int flagarg;
if (tcp->flags & TCB_CLONE_THREAD)
/* The children we wait for are our parent's children. */
got_kids = (tcp->parent->nchildren
> tcp->parent->nclone_detached);
> (tcp->parent->nclone_detached + tcp->parent->nclone_threads));
else
got_kids = (tcp->nchildren > tcp->nclone_detached);
got_kids = (tcp->nchildren > (tcp->nclone_detached + tcp->nclone_threads));
#else
got_kids = tcp->nchildren > 0;
#endif