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:
parent
d322a4bbe1
commit
304ea5f067
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user