This is the mail archive of the
mailing list for the Archer project.
Re: ptrace improvement: PTRACE_O_INHERIT
On 02/21, Roland McGrath wrote:
> > However. With or without PTRACE_O_TRACEEXIT, the thread can't go away
> > until ptracer does do_wait(WEXITED). And until it does do_wait() tkill()
> > succeeds even if the tracee is dead/zombie.
> That is true except in the case of MT exec (de_thread).
Ah! Indeed you are right, I forgot about this case again.
> The other threads
> live in the process at the time when another does exec will be immediately
> reaped without the chance for the debugger to see its death report.
Unless I missed something again, other threads are visible to wait().
But, in case de_thread() changes the leader, it does release_task(old_leader).
However, from ptrace pov it looks as if the execing thread goes away, it
changes its pid.
This reminds me. PTRACE_O_TRACEEXIT is not reliable if
arch_ptrace_stop_needed(). This is only sparc/ia64 so far, but we were
going to change ptrace_stop() so that it never stops if the process
was really killed by SIGKILL...