F>=1 .if 3F<=8 . if 3F>1 .if 3F<6 .ds an-extra3 "BSD Program- FORK(3F) BSD Reference Manual FORK(3F) mer's Manual NNAAMMEE fork - create a copy of this process SSYYNNOOPPSSIISS iinntteeggeerr ffuunnccttiioonn ffoorrkk(()) DDEESSCCRRIIPPTTIIOONN _F_o_r_k creates a copy of the calling process. The only dis- tinction between the 2 processes is that the value returned to one of them (referred to as the `parent' pro- cess) will be the process id of the copy. The copy is usually referred to as the `child' process. The value returned to the `child' process will be zero. All logical units open for writing are flushed before the fork to avoid duplication of the contents of I/O buffers in the external file(s). If the returned value is negative, it indicates an error and will be the negation of the system error code. See perror(3F). A corresponding _e_x_e_c routine has not been provided because there is no satisfactory way to retain open logical units across the exec. However, the usual function of _f_o_r_k_/_e_x_e_c can be performed using _s_y_s_t_e_m(3F). FFIILLEESS /usr/lib/libU77.a SSEEEE AALLSSOO fork(2), wait(3F), kill(3F), system(3F), perror(3F) 4.2 Berkeley Distribution June 5, 1993 1