Re: [PATCH 17/17] ptrace: implement PTRACE_LISTEN

From: Tejun Heo
Date: Tue Jun 14 2011 - 02:45:41 EST


Hey, Oleg.

On Mon, Jun 13, 2011 at 10:33:41PM +0200, Oleg Nesterov wrote:
> > and I don't see
> > good reasons to optimize it. Moreover, I think it doesn't hurt to
> > have a way to reliably trigger spurious notification.
>
> Well. I don't really understand why, but OK. Let's keep it this way.

So that we can just send SIGCONT to test how applications hold up
against spurious notifications. ie. making corner case a bit more
common and easier to reproduce so that it's more discoverable /
debuggable.

> > However, I think it's
> > done the current way for a reason - always trying to wake up on
> > SIGCONT is more robust in case something went out of sync
>
> Hmm. I am wondering if we can ever see why == 0 && __TASK_STOPPED with
> the recent fixes...

Probably not but I still think it's a better style to make SIGCONT
_always_ wake up. <obligatory inaccurate car analogy> It's like a car
brake. If transmission is in parking, gear interlocking should keep
the wheels from spinning and brake pedal input may be bypassed safely
for most cases, but, still, it's better to guarantee that stepping on
the brake pedal always makes the brake pads squeezed. </a>

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/