Re: [PATCH 6/9] job control: make task_clear_jobctl_pending()clear TRAPPING automatically

From: Tejun Heo
Date: Mon May 16 2011 - 12:09:57 EST


On Mon, May 16, 2011 at 06:00:19PM +0200, Oleg Nesterov wrote:
> > It's a safety mechanism. We shouldn't have TRAPPING set when no
> > stop/trap is pending and the above establishes that invariant
> Hmm. I thought that SIGCONT should add the new TRAPPING... My head spins.

So, it's two-fold, but we better talk about this with actual patches.

* SIGCONT always clears pending group stop - ie. JOBCTL_STOP_PENDING.
If clearing of that flag leaves no group stop / trap condition
pending (group stop pending was the only condition), it
automatically clears TRAPPING.

* SIGCONT schedules JOBCTL_TRAP_STOP (STOP trap site for ptracer) and
schedules TRAPPING, if tracee is already in TRAP_STOP for
notification. Note that this condition doesn't interact with the
above action.

> My only point, I still think that it is better to not apply these
> preparations right now, without the next SEIZE/etc changes.

Sure thing. As long as you don't see anything obviously wrong in the
prep patches, the rest of the series should be easier to review.

Anyways, will post soon.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at