ref: 9e8fc02528d531c922e75395b5a7037904445d4b
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(); }