详见http://bbs.csdn.net/topics/380205711
void abort(void) /* POSIX-style abort() function */
{
sigset_t mask;
struct sigaction action;
......
action.sa_handler = SIG_DFL;
sigaction(SIGABRT, &action, NULL); /* reset to default */
sigprocmask(SIG_SETMASK, &mask, NULL); /* just in case ... */
kill(getpid(), SIGABRT); /* and one more time */ exit(1); /* this should never be executed ... */
}