It is said that fork
system call creates a clone of the calling process, and then (usually) the child process issues execve
system call to change its i
Each step is relatively simple.
In Unix, your process has two parts -- a read-only memory area with the application code ("text") and the read-write memory area ("data").
A fork clones the read-write area, leaving the text page alone. You now have two processes running the same code. They differ by a register value -- the return value from fork -- which separates parent from child.
An exec replaces the text page, leaving the data page alone. There are many forms of exec, depending on how much environment information you're passing to it. See http://linux.die.net/man/3/exec for an additional list of variants.