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: [patch] Re: [BUG] gdb: quit hangs after step into signal handler


> On Wed, 22 Sep 2010 01:53:56 +0200, Roland McGrath wrote:
> > Even if you were paranoid about some old kernel where PTRACE_KILL might work
> > better (dubious if there are any such, but that's why it's paranoia), you
> > could do this before PTRACE_KILL and it should certainly be fine everywhere.
> 
> Problem is the inferior will start running after PTRACE_KILL.  Current GDB:
> 
> Quit anyway? (y or n) y
> <hang by sleep (600);>
> 
> read(0, "y\n", 1024)                    = 2
> ptrace(PTRACE_KILL, 32336, 0, 0)        = 0
> wait4(32336,
> 
> Before kill (SIGKILL) gets applied the code may do something unexpected.
> Why do you consider SIGKILL first, PTRACE_KILL second as worse?

What I recommended is kill/SIGKILL first, PTRACE_KILL second.  
That's not worse than anything else.


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