#include "dat.h" #include "fns.h" static char* mtpt; void srvthread(void* arg) { Node* vm = (Node*)arg; start_9p(vm); } void threadmain(int argc, char **argv) { mtpt = getenv("KURO_MTPT"); if (mtpt == nil) { sysfatal("KURO_MTPT not set"); } print("KURO_MTPT=%s\n", mtpt); /* ARGBEGIN{ }ARGEND */ Node* vm = create_node(argc > 0 ? argv[0] : nil); proccreate(srvthread, (void*)vm, 4096); supervise_node(vm); threadexitsall(0); }