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 <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrew Vagin 2015-10-27 10:44:00 +03:00 committed by Pavel Emelyanov
parent dc55d23805
commit 5b56e20d7d

View file

@ -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");