ref: 02e1ff2a5ef4a64e74e55c3f133377a19ce14ab1
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();
}