Usually , when a program calls another program , it first creates a child process by forking , then the child adjusts the environment as needed .
Lastly the child replaces itself with the program to be called .
Usually , when a program calls another program , it first creates a child process by forking , then the child adjusts the environment as needed and lastly the child replaces itself with the program to be called .