aboutsummaryrefslogtreecommitdiffstats
path: root/err.c
diff options
context:
space:
mode:
Diffstat (limited to 'err.c')
-rw-r--r--err.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/err.c b/err.c
new file mode 100644
index 0000000..24b2c7b
--- /dev/null
+++ b/err.c
@@ -0,0 +1,15 @@
+#include "err.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "log.h"
+
+void die(const char* err, ...) {
+ va_list p;
+ va_start(p, err);
+ log_write(LOG_ERR, err, p);
+ va_end(p);
+ exit(128);
+}