Compaq Fortran for Tru64 UNIX Alpha Systems V5.4
fork (3f)
creates a copy of a calling process
Syntax
integer*4 fork, irtn
external fork
irtn = fork( )
Description
The fork function creates a copy of the calling process. The only
distinction between the two processes is that the value returned to the
calling (parent) process is the process ID of the copy (child). The value
returned to the child process is 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 files.
A corresponding exec routine is not provided because there is no
satisfactory way to retain open logical units across the exec. See
system(3f) to perform the usual function of fork/exec.
Return Values
If the function returns a negative value, it indicates an error and is the
negation of the system error code. (See perror(3f).)
See Also
kill(3f), perror(3f), system(3f), wait(3f)