From 5b56e20d7dde98cfb671af9b75fa2fbcfb15a5bb Mon Sep 17 00:00:00 2001 From: Andrew Vagin Date: Tue, 27 Oct 2015 10:44:00 +0300 Subject: [PATCH] ptrace: skip ptraced zombies It's posiable that criu is able to attach to a process and then it becomes a zombie. $ while :; do bash ./zdtm.sh -C --freeze-cgroup /sys/fs/cgroup/freezer/test transition/fork || break; done ... (00.000978) Error (ptrace.c:154): SEIZE 13666: task not stopped after seize Signed-off-by: Andrew Vagin Signed-off-by: Pavel Emelyanov --- ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ptrace.c b/ptrace.c index 1945d62df..b28824bb0 100644 --- a/ptrace.c +++ b/ptrace.c @@ -131,7 +131,7 @@ try_again: goto err; } - if (ret < 0) { + if (ret < 0 || WIFEXITED(status) || WIFSIGNALED(status)) { if (cr.state != 'Z') { if (pid == getpid()) pr_err("The criu itself is within dumped tree.\n");