Re: [PATCH 10/10] ptrace: implement group stop notification forptracer

From: Tejun Heo
Date: Tue May 24 2011 - 11:44:40 EST


Hello, Oleg.

On Tue, May 24, 2011 at 03:44:11PM +0200, Tejun Heo wrote:
> > 2. ptrace_trap_notify() always sets JOBCTL_TRAP_NOTIFY. Even if the caller
> > is prepare_signal(SIGCONT) and there were no SIGSTOP in the past. This looks
> > a bit strange to me. I mean, perhaps it would be better to provoke the trap
> > only if this SIGCONT is going to change the jobctl state.
>
> Sure. It doesn't really matter tho and might even be better for
> weeding out invalid assumptions.

Hmmm... tried to change this but I think it's better as-is. As an
optimization, it isn't whole lot meaningful, and, if I do it, I would
probably end up moving SIGNAL_STOP_STOPPED and group_stop_count test
above actual wake up and then skipping wake up if none was true - it
would make SIGCONT handling more fragile without much benefit.

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/