Messages in this thread | | | From | Roland McGrath <> | Subject | Re: Race in ptrace. | Date | Thu, 11 Feb 2010 12:55:58 -0800 (PST) |
| |
> What I don't agree with is that when we send SIGCONT later with > "kill", we wake up the child at all. It may make sense to someone who > has access to the kernel source code, but from a user's point of view > this is a surprise. The signal is intercepted and should not have an > effect on the child.
This is the behavior of SIGCONT and doesn't really have anything to do with ptrace. Once you have let the SIGSTOP through, the process is in job control stop just like if you'd sent a SIGSTOP without using ptrace at all.
The distinction that is confusing you is that *generating* SIGCONT is what resumes the process, not *delivering* it. Another example is that if your process has SIGCONT blocked or ignored, SIGCONT still wakes it up. Another example is that SIGCONT wakes up all the threads in a process, before one of those threads delivers the SIGCONT (i.e. runs a handler).
Thanks, Roland
| |