2 * See if SA_NODEFER makes sigaction ignore sa_mask
3 * altogether. According to POSIX SA_NODEFER means: 'don't add the
4 * handler's signal to the mask'.
8 * This software is part of the SBCL system. See the README file for
11 * While most of SBCL is derived from the CMU CL system, many
12 * utilities for the build process (like this one) were written from
13 * scratch after the fork from CMU CL.
15 * This software is in the public domain and is provided with
16 * absolutely no warranty. See the COPYING and CREDITS files for
24 #include <sys/types.h>
29 handler(int signal, siginfo_t *info, void *void_context)
31 sigset_t empty, current;
34 sigprocmask(SIG_BLOCK, &empty, ¤t);
35 for(i = 1; i < NSIG; i++)
36 if (sigismember(¤t, i) != ((i == SIGABRT) ? 1 : 0))
42 main (int argc, char *argv[])
46 sa.sa_flags = SA_SIGINFO | SA_NODEFER;
47 sa.sa_sigaction = handler;
48 sigemptyset(&sa.sa_mask);
49 sigaddset(&sa.sa_mask, SIGABRT);
50 sigaction(SIGTRAP, &sa, NULL);
51 kill(getpid(), SIGTRAP);