This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ptrace improvement: PTRACE_O_INHERIT


On Sat, 19 Feb 2011 21:29:21 +0100, Oleg Nesterov wrote:
> Cough. I still can't understand why gdb needs tkill(TID, 0). Please
> ignore, I know nothing about gdb implementation.
> 
> 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.

Maybe:
          /* The thread has previously exited.  We need to delete it
             now because, for some vendor 2.4 kernels with NPTL
             support backported, there won't be an exit event unless
             it is the main thread.  2.6 kernels will report an exit
             event for each thread that exits, as expected.  */

There probably was a reason why it was once implemented.  Unfortunately GDB is
in use also on embedded targets with obsolete and patched Linux kernels so it
is not welcome to remove such code.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]