summaryrefslogtreecommitdiff
path: root/core/abort.c
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2024-11-19 14:38:24 -0600
committerDanny Holman <dholman@gymli.org>2024-11-19 14:38:24 -0600
commit534aba7074ff2ddcbeb5f4eae850fde7f65b94b9 (patch)
treee35053e7a1980ddf4575db31e2f907979b4b5d1a /core/abort.c
parent8b3cd02761887a80f440d55e46e1d47def48d962 (diff)
core: add an exit code list
Add a header file that lists common exit codes and use them in the abort function. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'core/abort.c')
-rw-r--r--core/abort.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/abort.c b/core/abort.c
index 292c1a1..cd66ab1 100644
--- a/core/abort.c
+++ b/core/abort.c
@@ -1,6 +1,7 @@
#include <rune/core/abort.h>
#include <rune/core/init.h>
#include <rune/core/logging.h>
+#include <rune/util/exits.h>
#include <stdlib.h>
#define MAX_TRACE_ITEMS 30
@@ -50,7 +51,7 @@ NORET void rune_abort(void) {
log_output(LOG_INFO, "Abort called, printing stack trace");
_stack_trace();
rune_exit();
- exit(-1);
+ exit(REXIT_FAIL);
}
#ifdef MSVC