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