actually working code
[mTask.git] / int / interface_linux.c
index 33fd003..1ec9347 100644 (file)
@@ -144,7 +144,25 @@ void setup(void)
                pdie("accept");
 }
 
-void test(void)
+void debug(char *fmt, ...)
 {
+       va_list ap;
+       va_start(ap, fmt);
+       vfprintf(stderr, fmt, ap);
+       va_end(ap);
+}
 
+void pdie(char *s)
+{
+       perror(s);
+       die("");
+}
+
+void die(char *fmt, ...)
+{
+       va_list ap;
+       va_start(ap, fmt);
+       vfprintf(stderr, fmt, ap);
+       va_end(ap);
+       exit(EXIT_FAILURE);
 }