PATCH: small signal bug fix

Roman Zippel (zippel@fh-brandenburg.de)
Sat, 24 Jul 1999 16:03:37 +0200 (MET DST)


Hi,

Below is a patch to make the SA_NODEFER for sigaction() like documented.
If SA_NODEFER was set, the complete sa_mask is ignored, I tested this on a
Solaris machine to be sure, where it works correctly.
That bug affects all architectures, so every arch/*/kernel/signal.c need a
similiar patch.
IMO that patch can go into 2.3 and the ac kernels, I'm not sure about 2.2,
although I can't imagine how it should break any application.

bye, Roman

--- linux/arch/i386/kernel/signal.c 1999/06/20 22:36:18 1.1.1.2
+++ linux/arch/i386/kernel/signal.c 1999/07/21 17:28:29
@@ -574,13 +574,12 @@
if (ka->sa.sa_flags & SA_ONESHOT)
ka->sa.sa_handler = SIG_DFL;

- if (!(ka->sa.sa_flags & SA_NODEFER)) {
- spin_lock_irq(&current->sigmask_lock);
- sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+ spin_lock_irq(&current->sigmask_lock);
+ sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+ if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&current->blocked,sig);
- recalc_sigpending(current);
- spin_unlock_irq(&current->sigmask_lock);
- }
+ recalc_sigpending(current);
+ spin_unlock_irq(&current->sigmask_lock);
}

/*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/