1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/* * abort.c */ #include <stdlib.h> #include <unistd.h> #include <signal.h> void abort(void) { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGABRT); sigprocmask(SIG_UNBLOCK, &set, NULL); raise(SIGABRT); _exit(255); /* raise() should have killed us */ }