On 10/06, Jan Kratochvil wrote:
>
> On Tue, 06 Oct 2009 19:14:28 +0200, Oleg Nesterov wrote:
> > On 10/06, Jan Kratochvil wrote:
> [...]
> > > If it is not reported to the new tracer then it will be always
> > > processed by the tracee, is it right?
> > 
> > Yes, sure.
> > 
> > (But, just in case... if the tracer does ptrace(DETACH, SIGNR), this
> >  signr only matters if the tracee was stopped after reporting syscall
> >  or signal, otherwise SIGNR is ignored).
> 
> In which specific cases SIGNR can get ignored?
> 
> Whole PTRACE_DETACH will be ignored if the tracee is not stopped.
> It SIGNR will be proabably ignored if the tracee is now dead.
> Otherwise SIGNR should get delivered, shouldn't it?

No (afaics).

For example, the tracee reports PTRACE_EVENT_EXEC and stops. In this
case SIGNR has no effect after PTRACE_CONT/DETACH/etc.

SIGNR does not ignored after the tracee reported syscall entry/exit or
signal.

If you think this should be changed, please tell. As always, I do not
know if it was supposed or not. (and in fact I should re-check my
understanding after sleep).

> > > +  /* SIGPIPE was still pending and it has not been yet delivered.  */
> > > +  if (WIFSTOPPED (status) && WSTOPSIG (status) == SIGPIPE)
> [...]
> > Yes, I didn't verify this yet, but I think with this patch the
> > test-case should succeed with utrace-ptrace kernel.
>
> Checked-in.

Thanks!

Oleg.

Reply via email to