Commit 42f77676 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

parasite: wait a specific pid

This code was written, when all threads were daemonized.
Now only a thread leader is daemonized.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 799182a1
......@@ -742,10 +742,7 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
/* Stop all threads on the enter point in sys_rt_sigreturn */
while (1) {
pid_t pid;
pid = wait4(-1, &status, __WALL, NULL);
if (pid < 0) {
if (wait4(pid, &status, __WALL, NULL) < 0) {
pr_perror("wait4 failed");
return -1;
}
......
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