Re: [PATCH] copy_process: remove the unneededclear_tsk_thread_flag(TIF_SIGPENDING)

From: Roland McGrath
Date: Mon Apr 27 2009 - 22:40:26 EST


Acked-by: Roland McGrath <roland@xxxxxxxxxx>

> The forked child can have TIF_SIGPENDING if it was copied from parent's
> ti->flags. But this is harmless and actually almost never happens, because
> copy_process() can't succeed if signal_pending() == T.

When it does happen, it's actually improper to clear it. In a CLONE_THREAD
case, the pending signals might include shared_pending signals that the
child too should take. (Arguably there is no way to notice, since the
parent thread will be racing to dequeue the same signals.)


Thanks,
Roland
--
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/