This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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] Fix Linux attach to signalled/stopped processes


On Mon, Apr 14, 2008 at 06:26:33PM -0700, Roland McGrath wrote:
> The significance of SIGSTOP is that it cannot be blocked (and that it's
> what PTRACE_ATTACH generates anyway).  For the thread "to be signalled",
> you have to generate some signal that is not blocked by that thread.
> Every other signal can be blocked, except for SIGKILL (which is too
> significant in its own right).

Thanks, I understand better now.  I'll update the comments in the
patch, so that I don't confuse the next person to look at this.

> In practice you will 99.44% of the time be able to find some RT signal
> that is not blocked.  But to worry about the 0.66% you still have to
> fall back to SIGSTOP, and in that case you can't rely on queuing.

Wouldn't this be racy, again?  If the process is running, it might be
about to block the signal we chose to stop it.

-- 
Daniel Jacobowitz
CodeSourcery


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