mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
tests: only wait for the pid we spawned
In the next patch, we'll introduce an option to allow for leaving zombie processes in the pid ns for the test so that we can test the behavior of zombies. Let's not reap everything after restore, since we'll reap the restored zombies as well. v2: restore the old behavior when in reap mode CC: Andrey Vagin <avagin@openvz.org> Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com> Acked-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
b3c42b28a9
commit
d5bee200a1
1 changed files with 7 additions and 2 deletions
|
|
@ -343,8 +343,13 @@ int ns_init(int argc, char **argv)
|
|||
kill(pid, SIGTERM);
|
||||
|
||||
ret = 0;
|
||||
while (ret != -1)
|
||||
ret = wait(NULL);
|
||||
if (reap) {
|
||||
while (ret != -1)
|
||||
ret = wait(NULL);
|
||||
} else {
|
||||
waitpid(pid, NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue