fork


The following program demonstrates the fork system call, and how the child receives its own copy-on-write version of the parent process' data, stack, and heap memory segments.

fork.c