wait_for_child() does now wait for the main thread of a dead child to be
gone. Fixes bug #1639. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25568 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4e9ac4d14e
commit
0a89fae916
@ -1940,6 +1940,12 @@ wait_for_child(pid_t child, uint32 flags, int32 *_reason,
|
||||
atomic_and(&thread->sig_pending, ~SIGNAL_TO_MASK(SIGCHLD));
|
||||
}
|
||||
|
||||
// When the team is dead, the main thread continues to live in the kernel
|
||||
// team for a very short time. To avoid surprises for the caller we rather
|
||||
// wait until the thread is really gone.
|
||||
if (foundEntry.state == JOB_CONTROL_STATE_DEAD)
|
||||
wait_for_thread(foundEntry.thread, NULL);
|
||||
|
||||
T(WaitForChildDone(foundEntry));
|
||||
|
||||
return foundEntry.thread;
|
||||
|
Loading…
x
Reference in New Issue
Block a user