diff options
Diffstat (limited to 'sysfatal.c')
| -rw-r--r-- | sysfatal.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sysfatal.c b/sysfatal.c new file mode 100644 index 0000000..9a63264 --- /dev/null +++ b/sysfatal.c @@ -0,0 +1,15 @@ +#include <stdlib.h> +#include <stdio.h> +#include <stdarg.h> +#include "sysfatal.h" + +void +sysfatal(const char * format, ...) { + va_list args; + + va_start(args, format); + vfprintf(stderr, format, args); + va_end(args); + fflush(NULL); + exit(1); +} |