Initial revision
diff --git a/src/lib9/sysfatal.c b/src/lib9/sysfatal.c
new file mode 100644
index 0000000..f9ab698
--- /dev/null
+++ b/src/lib9/sysfatal.c
@@ -0,0 +1,20 @@
+#include <lib9.h>
+
+void (*_sysfatal)(char*, ...);
+
+void
+sysfatal(char *fmt, ...)
+{
+	char buf[256];
+	va_list arg;
+
+	va_start(arg, fmt);
+	if(_sysfatal)
+		(*_sysfatal)(fmt, arg);
+	vseprint(buf, buf+sizeof buf, fmt, arg);
+	va_end(arg);
+
+	fprint(2, "%s; %s\n", argv0 ? argv0 : "<prog>", buf);
+	exits("fatal");
+}
+