Commit b33fa025 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

parasite: wait for any child process

If parasite exited unexpectedly, CRIU gets SIGCHLD and handles it.
In sigchld handler we need to wait any child process.
Currently criu waits neighbours in its group, but a dumped
processes is in another group usually. Here is a typo.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 272c94e3
......@@ -346,7 +346,7 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
pr_err("si_code=%d si_pid=%d si_status=%d\n",
siginfo->si_code, siginfo->si_pid, siginfo->si_status);
pid = waitpid(0, &status, WNOHANG);
pid = waitpid(-1, &status, WNOHANG);
if (pid <= 0)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment