aboutsummaryrefslogtreecommitdiff
path: root/src/abort_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/abort_handler.c')
-rw-r--r--src/abort_handler.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/abort_handler.c b/src/abort_handler.c
deleted file mode 100644
index 8347f3a..0000000
--- a/src/abort_handler.c
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static void abort_handler(__attribute__((unused)) int signo) {
- fopen("aborted", "w");
-}
-
-static void __attribute__((constructor)) register_abort_handler(void)
-{
- struct sigaction sa;
- sa.sa_handler = abort_handler;
- sigemptyset(&sa.sa_mask);
-
- if (sigaction(SIGABRT, &sa, NULL) == -1) {
- perror("sigaction");
- exit(1);
- }
-}
-