23 #if not ( defined BOOST_MSVC || defined ALPS_NO_SIGNALS ) 24 static bool initialized;
28 static struct sigaction action;
29 memset(&action, 0,
sizeof(action));
31 sigaction(SIGINT, &action, NULL);
32 sigaction(SIGTERM, &action, NULL);
33 sigaction(SIGXCPU, &action, NULL);
34 sigaction(SIGQUIT, &action, NULL);
35 sigaction(SIGUSR1, &action, NULL);
36 sigaction(SIGUSR2, &action, NULL);
43 return end_ == begin_;
47 return signals_[(end_ - 1) & 0x1F];
55 #if not ( defined BOOST_MSVC || defined ALPS_NO_SIGNALS ) 56 static bool initialized;
60 static struct sigaction action;
61 memset(&action, 0,
sizeof(action));
63 sigaction(SIGSEGV, &action, NULL);
64 sigaction(SIGBUS, &action, NULL);
70 fprintf(stderr,
"Received signal %i\n", signal);
79 fprintf(stderr,
"Abort by signal %i\n", signal);
84 std::size_t signal::begin_ = 0;
85 std::size_t signal::end_ = 0;
86 boost::array<int, 32> signal::signals_;
static void slot(int signal)
static void segfault(int signal)