|
NAMErfork - manipulate process stateSYNOPSIS#include <u.h>#include <libc.h> int rfork(int flags) DESCRIPTIONRfork is a partial implementation of the Plan 9 system call. It can be used to manipulate some process state and to create new processes a la It cannot be used to create shared-memory processes (Plan 9's RFMEM flag); for that functionality use proccreate (seeThe flags argument to rfork selects which resources of the invoking process (parent) are shared by the new process (child) or initialized to their default values. Flags is the logical OR of some subset of
File descriptors in a shared file descriptor table are kept open until either they are explicitly closed or all processes sharing the table exit. If RFPROC is set, the value returned in the parent process is the process id of the child process; the value returned in the child is zero. Without RFPROC, the return value is zero. Process ids range from 1 to the maximum integer (int) value. Rfork will sleep, if necessary, until required process resources are available. Calling rfork(RFFDG|RFPROC) is equivalent to calling SOURCE/src/lib9/rfork.cDIAGNOSTICSRfork sets errstr. Visit the GSP FreeBSD Man Page Interface. |