tsysfatal.c - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
tsysfatal.c (322B)
---
1 #include <lib9.h>
2
3 void (*_sysfatal)(char*, ...);
4
5 void
6 sysfatal(char *fmt, ...)
7 {
8 char buf[256];
9 va_list arg;
10
11 va_start(arg, fmt);
12 if(_sysfatal)
13 (*_sysfatal)(fmt, arg);
14 vseprint(buf, buf+sizeof buf, fmt, arg);
15 va_end(arg);
16
17 __fixargv0();
18 fprint(2, "%s: %s\n", argv0 ? argv0 : "<prog>", buf);
19 exits("fatal");
20 }