[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100211205558.B5BCB8163@magilla.sf.frob.com>
Date: Thu, 11 Feb 2010 12:55:58 -0800 (PST)
From: Roland McGrath <roland@...hat.com>
To: Salman Qazi <sqazi@...gle.com>
Cc: Oleg Nesterov <oleg@...hat.com>, taviso@...gle.com,
Roland Dreier <rolandd@...co.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: Race in ptrace.
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists