aboutsummaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
authorkoekeishiya <aasvi93@hotmail.com>2023-05-27 20:02:07 +0200
committerkoekeishiya <aasvi93@hotmail.com>2023-05-27 20:02:07 +0200
commit8001c9ad537d43eb587c5a325296bdaebd565708 (patch)
tree5c50636e6e92ec5102ca1aae3ab71dd2845f3675 /src/log.h
parentb06f2332e7eb08e2132d36462af759ed5da94ab4 (diff)
downloadskhd-8001c9ad537d43eb587c5a325296bdaebd565708.tar.gz
skhd-8001c9ad537d43eb587c5a325296bdaebd565708.zip
improve launchd integration
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/log.h b/src/log.h
index 2e8167b..d3cf6f1 100644
--- a/src/log.h
+++ b/src/log.h
@@ -33,4 +33,14 @@ error(const char *format, ...)
exit(EXIT_FAILURE);
}
+static inline void
+require(const char *format, ...)
+{
+ va_list args;
+ va_start(args, format);
+ vfprintf(stderr, format, args);
+ va_end(args);
+ exit(EXIT_SUCCESS);
+}
+
#endif