Node:Creating a Process, Next:Executing a File, Previous:Process Identification, Up:Processes
The fork
function is the primitive for creating a process.
It is declared in the header file unistd.h
.
pid_t fork (void) | Function |
The fork function creates a new process.
If the operation is successful, there are then both parent and child
processes and both see If process creation failed,
|
The specific attributes of the child process that differ from the parent process are:
pid_t vfork (void) | Function |
The vfork function is similar to fork but on some systems
it is more efficient; however, there are restrictions you must follow to
use it safely.
While You must be very careful not to allow the child process created with
Some operating systems don't really implement |