Messages in this thread Patch in this message | | | Date | Mon, 20 Aug 2007 20:01:57 +0400 | From | Oleg Nesterov <> | Subject | [PATCH] do_sigaction: don't worry about signal_pending() |
| |
do_sigaction() returns -ERESTARTNOINTR if signal_pending(). The comment says:
* If there might be a fatal signal pending on multiple * threads, make sure we take it before changing the action.
I think this is not needed. We should only worry about SIGNAL_GROUP_EXIT case, bit it implies a pending SIGKILL which can't be cleared by do_sigaction.
Kill this special case.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- t/kernel/signal.c~SA_NOPEND 2007-08-20 19:40:31.000000000 +0400 +++ t/kernel/signal.c 2007-08-20 19:43:41.000000000 +0400 @@ -2300,15 +2300,6 @@ int do_sigaction(int sig, struct k_sigac k = ¤t->sighand->action[sig-1]; spin_lock_irq(¤t->sighand->siglock); - if (signal_pending(current)) { - /* - * If there might be a fatal signal pending on multiple - * threads, make sure we take it before changing the action. - */ - spin_unlock_irq(¤t->sighand->siglock); - return -ERESTARTNOINTR; - } - if (oact) *oact = *k; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |