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

parasite: handle errors of PTRACE_INTERRUPT

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 842dbf6e
...@@ -692,7 +692,10 @@ static int parasite_fini_seized(struct parasite_ctl *ctl) ...@@ -692,7 +692,10 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
return 0; return 0;
/* Start to trace syscalls for each thread */ /* Start to trace syscalls for each thread */
ptrace(PTRACE_INTERRUPT, pid, NULL, NULL); if (ptrace(PTRACE_INTERRUPT, pid, NULL, NULL)) {
pr_perror("Unable to interrupt the process");
return -1;
}
pr_debug("Waiting for %d to trap\n", pid); pr_debug("Waiting for %d to trap\n", pid);
if (wait4(pid, &status, __WALL, NULL) != pid) { if (wait4(pid, &status, __WALL, NULL) != pid) {
......
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