mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
zdtm: pidns03: Wait till child dead
Wait child before daemonization to do not allow zdtm.py to see child fds and maps before it becomes zombie. Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
@@ -113,6 +113,13 @@ static int child_fn(void)
|
||||
goto err;
|
||||
} else if (!pid)
|
||||
exit(0);
|
||||
|
||||
ret = waitid(P_PID, pid, NULL, WEXITED|WNOWAIT);
|
||||
if (ret) {
|
||||
fail("Can't wait");
|
||||
goto err;
|
||||
}
|
||||
|
||||
futex_set_and_wake(futex, CHILD_PREPARED);
|
||||
futex_wait_while_lt(futex, POST_RESTORE_CHECK);
|
||||
|
||||
|
Reference in New Issue
Block a user