summaryrefslogtreecommitdiffstats
path: root/usr/klibc/abort.c
blob: 4629a1790826cb8fa12ccf06cbe1645255867dfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * 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 */
}