Plan 9 from User Space's /usr/local/plan9/src/libthread/test/tdaemon.c

#include <u.h>
#include <libc.h>
#include <thread.h>

void
proc(void *v)
{
	sleep(5*1000);
	print("still running\n");
}

void
threadmain(int argc, char **argv)
{
	proccreate(proc, nil, 32768);
}

Space Glenda

Copyright © 2005 Lucent Technologies, Russ Cox, MIT.
See license for details.