3 rfork \- manipulate process state
15 is a partial implementation of the Plan 9 system call.
16 It can be used to manipulate some process state and to create
19 It cannot be used to create shared-memory processes
22 flag); for that functionality use
31 selects which resources of the
32 invoking process (parent) are shared
33 by the new process (child) or initialized to
36 is the logical OR of some subset of
40 If set a new process is created; otherwise changes affect the
44 If set, the child process will be dissociated from the parent. Upon
45 exit the child will leave no
49 for the parent to collect.
52 .\" If set, the new process inherits a copy of the parent's name space;
53 .\" otherwise the new process shares the parent's name space.
54 .\" Is mutually exclusive with
58 .\" If set, the new process starts with a clean name space. A new
59 .\" name space must be built from a mount of an open file descriptor.
60 .\" Is mutually exclusive with
64 .\" If set, subsequent mounts into the new name space and dereferencing
65 .\" of pathnames starting with
70 .\" If set, the environment variables are copied;
71 .\" otherwise the two processes share environment variables.
72 .\" Is mutually exclusive with
76 .\" If set, the new process starts with an empty environment.
77 .\" Is mutually exclusive with
81 Each process is a member of a group of processes that all
82 receive notes when a note is sent to the group
87 The group of a new process is by default the same as its parent, but if
91 the process becomes the first in a new group, isolated from
93 In Plan 9, a process can call
95 and then be sure that it will no longer receive console interrupts
97 Unix job-control shells put each command in its own process group
98 and then relay notes to the current foreground command, making
99 the idiom less useful.
102 If set, the invoker's file descriptor table (see
104 is copied; otherwise the two processes share a
108 .\" If set, the new process starts with a clean file descriptor table.
109 .\" Is mutually exclusive with
113 .\" If set, the process will be unable to
114 .\" .IR rendezvous (3)
115 .\" with any of its ancestors; its children will, however, be able to
117 .\" with it. In effect,
119 .\" makes the process the first in a group of processes that share a space for
124 .\" If set, the child and the parent will share
129 .\" Otherwise, the child inherits a copy of those segments.
130 .\" Other segment types, in particular stack segments, will be unaffected.
131 .\" May be set only with
135 File descriptors in a shared file descriptor table are kept
136 open until either they are explicitly closed
137 or all processes sharing the table exit.
142 value returned in the parent process
144 of the child process; the value returned in the child is zero.
147 the return value is zero.
148 Process ids range from 1 to the maximum integer
152 will sleep, if necessary, until required process resources are available.
155 .B rfork(RFFDG|RFPROC)
156 is equivalent to calling
159 .B \*9/src/lib9/rfork.c