Concept Flow - Process creation (fork and exec)
Start: Running Process
Call fork()
Create Child Process
Child: Returns 0 from fork()
Call exec() to run new program
Replace Child's code with new program
Parent: Returns child's PID from fork()
Parent continues original program
The original process calls fork() to create a child. The child gets 0 return and can call exec() to run a new program. The parent gets child's ID and continues.