diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-01-02 12:18:50 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-01-02 12:18:50 +0000 |
commit | b88ff80f703931b368d27ebd898accdae5b31e60 (patch) | |
tree | 79aa8e4d9b249e165973423a04fb3b4889308aa3 /libc/signal/bsd_sig.c | |
parent | cac4a2ef934d7ac5314c874b88b62e922fc70690 (diff) |
Once again, rework the signal handling to be even more correct. We no
longer segfault when running test/signal/sigchld.c, which exposed a bit
of a rats nest. The problem ended up being a erroneous syscall
defination, but in the process of finding that out, I scrubbed things
up nicely and adapted things to use the rt_ signals if they are
available. This now passes all the signal tests.
-Erik
Diffstat (limited to 'libc/signal/bsd_sig.c')
-rw-r--r-- | libc/signal/bsd_sig.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/libc/signal/bsd_sig.c b/libc/signal/bsd_sig.c deleted file mode 100644 index 405447eae..000000000 --- a/libc/signal/bsd_sig.c +++ /dev/null @@ -1,34 +0,0 @@ -#define __USE_BSD_SIGNAL - -#include <signal.h> - -#undef signal - -/* The `sig' bit is set if the interrupt on it - * is enabled via siginterrupt (). */ -extern sigset_t _sigintr; - -__sighandler_t -__bsd_signal (int sig, __sighandler_t handler) -{ - int ret; - struct sigaction action, oaction; - action.sa_handler = handler; - __sigemptyset (&action.sa_mask); - if (!__sigismember (&_sigintr, sig)) { -#ifdef SA_RESTART - action.sa_flags = SA_RESTART; -#else - action.sa_flags = 0; -#endif - } - else { -#ifdef SA_INTERRUPT - action.sa_flags = SA_INTERRUPT; -#else - action.sa_flags = 0; -#endif - } - ret = sigaction (sig, &action, &oaction); - return (ret == -1) ? SIG_ERR : oaction.sa_handler; -} |