1FORK(3F) FORK(3F)
2
3
4
6 fork - create a copy of this process
7
9 integer function fork()
10
12 Fork creates a copy of the calling process. The only distinction
13 between the 2 processes is that the value returned to one of them
14 (referred to as the `parent' process) will be the process id of the
15 copy. The copy is usually referred to as the `child' process. The
16 value returned to the `child' process will be zero.
17
18 All logical units open for writing are flushed before the fork to avoid
19 duplication of the contents of I/O buffers in the external file(s).
20
21 If the returned value is negative, it indicates an error and will be
22 the negation of the system error code. See perror(3F).
23
24 A corresponding exec routine has not been provided because there is no
25 satisfactory way to retain open logical units across the exec. How‐
26 ever, the usual function of fork/exec can be performed using sys‐
27 tem(3F).
28
30 /usr/lib/libU77.a
31
33 fork(2), wait(3F), kill(3F), system(3F), perror(3F)
34
35
36
374.2 Berkeley Distribution May 27, 1986 FORK(3F)