diff options
author | rsc <devnull@localhost> | 2005-01-03 06:40:20 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-03 06:40:20 +0000 |
commit | 058b0118a52061ad57694c01fc8763b22b789c4d (patch) | |
tree | 6685f04dea5ed68edaa34998c976aed34c55fe94 /man/man3/fork.3 | |
parent | 2600337aa704efbeba8201e88147a764b4fd2b90 (diff) | |
download | plan9port-058b0118a52061ad57694c01fc8763b22b789c4d.tar.gz plan9port-058b0118a52061ad57694c01fc8763b22b789c4d.tar.bz2 plan9port-058b0118a52061ad57694c01fc8763b22b789c4d.zip |
Some man pages.
Diffstat (limited to 'man/man3/fork.3')
-rw-r--r-- | man/man3/fork.3 | 166 |
1 files changed, 0 insertions, 166 deletions
diff --git a/man/man3/fork.3 b/man/man3/fork.3 deleted file mode 100644 index e17f0d67..00000000 --- a/man/man3/fork.3 +++ /dev/null @@ -1,166 +0,0 @@ -.TH FORK 3 -.SH NAME -fork, rfork \- manipulate process resources -.SH SYNOPSIS -.B #include <u.h> -.br -.B #include <libc.h> -.PP -.nf -.B -int fork(void) -.PP -.B -int rfork(int flags) -.fi -.SH DESCRIPTION -Forking is the only way new processes are created. -The -.I flags -argument to -.I rfork -selects which resources of the -invoking process (parent) are shared -by the new process (child) or initialized to -their default values. -The resources include -the file name space, -the open file descriptor table (which, when shared, permits processes -to open and close files for other processes), -the set of environment variables -(see -.IR env (3)), -the note group -(the set of processes that receive notes written to a member's -.B notepg -file; -see -.IR proc (3)), -the set of rendezvous tags -(see -.IR rendezvous (3)); -and open files. -.I Flags -is the logical OR of some subset of -.TF RFCNAMEG -.TP -.B RFPROC -If set a new process is created; otherwise changes affect the -current process. -.TP -.B RFNOWAIT -If set, the child process will be dissociated from the parent. Upon -exit the child will leave no -.B Waitmsg -(see -.IR wait (3)) -for the parent to collect. -.TP -.B RFNAMEG -If set, the new process inherits a copy of the parent's name space; -otherwise the new process shares the parent's name space. -Is mutually exclusive with -.BR RFCNAMEG . -.TP -.B RFCNAMEG -If set, the new process starts with a clean name space. A new -name space must be built from a mount of an open file descriptor. -Is mutually exclusive with -.BR RFNAMEG . -.TP -.B RFNOMNT -If set, subsequent mounts into the new name space and dereferencing -of pathnames starting with -.B # -are disallowed. -.TP -.B RFENVG -If set, the environment variables are copied; -otherwise the two processes share environment variables. -Is mutually exclusive with -.BR RFCENVG . -.TP -.B RFCENVG -If set, the new process starts with an empty environment. -Is mutually exclusive with -.BR RFENVG . -.TP -.B RFNOTEG -Each process is a member of a group of processes that all -receive notes when a note is written to any of their -.B notepg -files (see -.IR proc (3)). -The group of a new process is by default the same as its parent, but if -.B RFNOTEG -is set (regardless of -.BR RFPROC ), -the process becomes the first in a new group, isolated from -previous processes. -.TP -.B RFFDG -If set, the invoker's file descriptor table (see -.IR intro (3)) -is copied; otherwise the two processes share a -single table. -.TP -.B RFCFDG -If set, the new process starts with a clean file descriptor table. -Is mutually exclusive with -.BR RFFDG . -.TP -.B RFREND -If set, the process will be unable to -.IR rendezvous (3) -with any of its ancestors; its children will, however, be able to -.B rendezvous -with it. In effect, -.B RFREND -makes the process the first in a group of processes that share a space for -.B rendezvous -tags. -.TP -.B RFMEM -If set, the child and the parent will share -.B data -and -.B bss -segments. -Otherwise, the child inherits a copy of those segments. -Other segment types, in particular stack segments, will be unaffected. -May be set only with -.BR RFPROC . -.PD -.PP -File descriptors in a shared file descriptor table are kept -open until either they are explicitly closed -or all processes sharing the table exit. -.PP -If -.B 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 -.BR RFPROC , -the return value is zero. -Process ids range from 1 to the maximum integer -.RB ( int ) -value. -.I Rfork -will sleep, if necessary, until required process resources are available. -.PP -.I Fork -is just a call of -.BR rfork(RFFDG|RFREND|RFPROC) . -.SH SOURCE -.B /usr/local/plan9/src/libc/9syscall -.br -.B /usr/local/plan9/src/libc/9sys/fork.c -.SH SEE ALSO -.IR intro (3), -.IR proc (3), -.SH DIAGNOSTICS -These functions set -.IR errstr . |