mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-15 11:20:03 +00:00
21 lines
306 B
C
21 lines
306 B
C
|
#define NOPLAN9DEFINES
|
||
|
#include <lib9.h>
|
||
|
|
||
|
int
|
||
|
p9rfork(int flags)
|
||
|
{
|
||
|
if(flags&RFPROC){
|
||
|
werrstr("cannot use rfork to fork -- use ffork");
|
||
|
return -1;
|
||
|
}
|
||
|
if(flags&RFNOTEG){
|
||
|
setpgrp(0, 0);
|
||
|
flags &= ~RFNOTEG;
|
||
|
}
|
||
|
if(flags){
|
||
|
werrstr("unknown flags %08ux in rfork", flags);
|
||
|
return -1;
|
||
|
}
|
||
|
return 0;
|
||
|
}
|