Re: [PATCH 8/8] job control: Don't send duplicate job control stopnotification while ptraced

From: Oleg Nesterov
Date: Mon Mar 21 2011 - 13:58:16 EST


On 03/08, Tejun Heo wrote:
>
> static bool task_participate_group_stop(struct task_struct *task)
> {
> @@ -284,7 +288,11 @@ static bool task_participate_group_stop(struct task_struct *task)
> if (!WARN_ON_ONCE(sig->group_stop_count == 0))
> sig->group_stop_count--;
>
> - if (!sig->group_stop_count) {
> + /*
> + * Tell the caller to notify completion iff we are entering into a
> + * fresh group stop. Read comment in do_signal_stop() for details.
> + */
> + if (!sig->group_stop_count && !(sig->flags & SIGNAL_STOP_STOPPED)) {
> sig->flags = SIGNAL_STOP_STOPPED;
> return true;

Ah, indeed. And this fixes the problems with the extra notification I
mentioned when I was looking at 1/8.

Oleg.

--
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/