ref: eb8b9ee63822d9a750a6507af00f33c5faf2d3a7
dir: /sys/src/ape/lib/ap/plan9/setsid.c/
#include "lib.h"
#include <unistd.h>
#include "sys9.h"
pid_t
setsid(void)
{
if(_RFORK(RFNAMEG|RFNOTEG) < 0){
_syserrno();
return -1;
}
_sessleader = 1;
return getpgrp();
}