X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Finterrupt.c;h=cb85bee726cb0fd8c4040710520e13ed77d642ac;hb=310aee0b439b715a5ec242862ab0a4d254e123b5;hp=f24c454adf13b2dcbac463615749773b944f718d;hpb=e4542bc034db18cf98f005b2dac53a6d7d5c7260;p=sbcl.git diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index f24c454..cb85bee 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -1075,24 +1075,22 @@ sigaction_nodefer_test_handler(int signal, siginfo_t *info, void *void_context) static void see_if_sigaction_nodefer_works() { - struct sigaction sa; + struct sigaction sa, old_sa; sa.sa_flags = SA_SIGINFO | SA_NODEFER; sa.sa_sigaction = sigaction_nodefer_test_handler; sigemptyset(&sa.sa_mask); sigaddset(&sa.sa_mask, SIGABRT); - /* We can use any signal for which a handler will be installed - * later. Let's go with SIGINT because gdb barfs on SIGTRAP on - * Darwin. */ - sigaction(SIGINT, &sa, NULL); + sigaction(SIGUSR1, &sa, &old_sa); /* Make sure no signals are blocked. */ { sigset_t empty; sigemptyset(&empty); sigprocmask(SIG_SETMASK, &empty, 0); } - kill(getpid(), SIGINT); + kill(getpid(), SIGUSR1); while (sigaction_nodefer_works == -1); + sigaction(SIGUSR1, &old_sa, NULL); } static void