[CRIU] [PATCH 5/5] check: check_ptrace_peeksiginfo -- Return -1 on error

Cyrill Gorcunov gorcunov at openvz.org
Mon Mar 25 17:26:40 EDT 2013


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-check.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cr-check.c b/cr-check.c
index bc7d33c..395e75a 100644
--- a/cr-check.c
+++ b/cr-check.c
@@ -462,7 +462,7 @@ int check_ptrace_peeksiginfo()
 	}
 
 	if (ptrace(PTRACE_ATTACH, pid, NULL, NULL) == -1)
-		return 1;
+		return -1;
 
 	waitpid(pid, NULL, 0);
 
@@ -472,7 +472,7 @@ int check_ptrace_peeksiginfo()
 
 	if (ptrace(PTRACE_PEEKSIGINFO, pid, &arg, &siginfo) != 0) {
 		pr_perror("Unable to dump pending signals\n");
-		ret = 1;
+		ret = -1;
 	}
 
 	ptrace(PTRACE_KILL, pid, NULL, NULL);
-- 
1.8.1.4



More information about the CRIU mailing list