summaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/process.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2011-08-18 20:04:29 +0100
committerRichard Weinberger <richard@nod.at>2011-11-02 14:14:56 +0100
commite87df986ed053d25dbd57b8b137edec5022874f8 (patch)
tree93a955eb7136ddfb30f9a1c99038976729823af4 /arch/um/os-Linux/process.c
parentd5c7e8b4ec4795ed0b8943cad8f87801fde371d7 (diff)
um: simplify set_handler()
For one thing, we always block the same signals (IRQ ones - IO, WINCH, VTALRM), so there's no need to pass sa_mask elements in arguments. For another, the flags depend only on whether it's an IRQ signal or not (we add SA_RESTART for them). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/os-Linux/process.c')
-rw-r--r--arch/um/os-Linux/process.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c
index c1a8fa74ebb..075ae920143 100644
--- a/arch/um/os-Linux/process.c
+++ b/arch/um/os-Linux/process.c
@@ -235,20 +235,13 @@ out:
void init_new_thread_signals(void)
{
- set_handler(SIGSEGV, (__sighandler_t) sig_handler, SA_ONSTACK,
- SIGIO, SIGWINCH, SIGVTALRM, -1);
- set_handler(SIGTRAP, (__sighandler_t) sig_handler, SA_ONSTACK,
- SIGIO, SIGWINCH, SIGVTALRM, -1);
- set_handler(SIGFPE, (__sighandler_t) sig_handler, SA_ONSTACK,
- SIGIO, SIGWINCH, SIGVTALRM, -1);
- set_handler(SIGILL, (__sighandler_t) sig_handler, SA_ONSTACK,
- SIGIO, SIGWINCH, SIGVTALRM, -1);
- set_handler(SIGBUS, (__sighandler_t) sig_handler, SA_ONSTACK,
- SIGIO, SIGWINCH, SIGVTALRM, -1);
+ set_handler(SIGSEGV, (__sighandler_t) sig_handler);
+ set_handler(SIGTRAP, (__sighandler_t) sig_handler);
+ set_handler(SIGFPE, (__sighandler_t) sig_handler);
+ set_handler(SIGILL, (__sighandler_t) sig_handler);
+ set_handler(SIGBUS, (__sighandler_t) sig_handler);
signal(SIGHUP, SIG_IGN);
-
- set_handler(SIGIO, (__sighandler_t) sig_handler,
- SA_ONSTACK | SA_RESTART, SIGIO, SIGWINCH, SIGVTALRM, -1);
+ set_handler(SIGIO, (__sighandler_t) sig_handler);
signal(SIGWINCH, SIG_IGN);
signal(SIGTERM, SIG_DFL);
}