+ for(;;)
+ {
+ const int stackSize = 512-16;
+ const int stackOffset = 65;
+ char *stack = calloc(1, stackSize);
+ int tid;
+ if( !stack ) {
+ printf("Outta heap space!\n");
+ return 0;
+ }
+ tid = _SysClone(0, stack+stackSize-stackOffset);
+ //_SysDebug("tid = %i", tid);
+ if( tid == 0 )
+ {
+ // Sleep forever (TODO: Fix up the stack so it can nuke)
+ for(;;) _SysWaitEvent(THREAD_EVENT_SIGNAL);
+ }
+ if( tid < 0 ) {
+ printf("Clone failed\n");
+ return 0;
+ }
+ }