summaryrefslogtreecommitdiff
path: root/com32/lib/abort.c
blob: 9280d9861bed396c4ae362bf97a2593de4996995 (plain)
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 */
}