[CRIU] [PATCH] ptrace: check that process is stopped by SIGTRAP
Pavel Emelyanov
xemul at parallels.com
Sat Jun 22 02:14:47 EDT 2013
On 06/20/2013 12:42 AM, Andrey Vagin wrote:
> All other states are unexpected.
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> parasite-syscall.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/parasite-syscall.c b/parasite-syscall.c
> index 4853cf6..8aed5ee 100644
> --- a/parasite-syscall.c
> +++ b/parasite-syscall.c
> @@ -814,6 +814,11 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
> return -1;
> }
>
> + if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGTRAP) {
> + pr_err("Task is in unexpected state: %x\n", status);
> + return -1;
> + }
> +
> pr_debug("%d was trapped\n", pid);
> if (!WIFSTOPPED(status)) {
> pr_err("%d\n", status);
>
applied
More information about the CRIU
mailing list