[CRIU] [PATCH 5/8] parasite: handle errors of PTRACE_INTERRUPT

Andrey Vagin avagin at openvz.org
Fri Jun 14 07:04:56 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 parasite-syscall.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/parasite-syscall.c b/parasite-syscall.c
index be6f5d1..0050faf 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -759,7 +759,10 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
 		return 0;
 
 	/* 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);
 	if (wait4(pid, &status, __WALL, NULL) != pid) {
-- 
1.8.2



More information about the CRIU mailing list