Re: SIGSTOP && ptrace (Was: ptrace(PTRACE_SYSCALL/CONT/DETACH, ..., SIGSTOP) does not work)

From: Denys Vlasenko
Date: Fri Apr 24 2009 - 17:14:23 EST


On Friday 24 April 2009 08:23, Roland McGrath wrote:
> > Perhaps, you should ask how strace can distinguish between "SIGSTOP
> > recieved" and "group-stop completed". I am not 100% sure, but at first
> > glance this looks possible.
>
> It is, but it's easier than the hack you suggest. PTRACE_GETSIGINFO only
> works for a ptrace stop, not a job control stop. If wait reported SIGSTOP,
> PTRACE_GETSIGINFO will fail with EINVAL for a job control stop but will
> succeed for a ptrace stop.

I already tested it and it works.
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/