Re: [RFC] Proposal for ptrace improvements

From: Tejun Heo
Date: Wed Mar 02 2011 - 02:44:56 EST


On Wed, Mar 02, 2011 at 06:07:35AM +0100, Indan Zupancic wrote:
> I'm not sure what Denys is talking about: Currently it's impossible to
> pass along SIGSTOP to traced processes. Quoting the ptrace manpage:
>
> PTRACE_CONT
> Restarts the stopped child process. If data is nonzero and not
> SIGSTOP, it is interpreted as a signal to be delivered to the
> child; otherwise, no signal is delivered.

AFAICS, that's not true. SIGSTOP isn't treated differently from other
signals in the ptrace signal delivery path. Maybe it was true in the
past.

> As for distinguishing STOP signals from stopped childs: Just don't set
> the WUNTRACED flag in the tracer for waitpid.

I'm not following. Can you please elaborate?

> To me it seems clear that job ctl state should be managed independently
> of ptrace stopped state. I'm not sure how that fits in with your
> proposed changes, but my impression is that you make everything a lot
> simpler by separating traced stopping/continuing from SIGSTOP/SIGCONT
> job control. It's just not the same. A task stopped by a trace event
> shouldn't generate a STOP signal for it's parent, only for real SIGSTOPS.

Again, not following. In the proposal, job control and ptrace operate
independently, so on that we seem to agree, but I can't understand
where the STOP signal for the parent comes from? What are you
referring to?

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/