next up previous contents Back to Operating Systems Home Page
Next: Program environment Up: Process Description and Control Previous: Closing files

Execution of programs inside processes

The main use of the fork() function is to create a new process so that a task other than the parent's can be executed in it. This is accomplished by calling one of the exec system calls (there are six of them, and none of them is called exec, but we'll refer collectively to them with this name: they differ only in how their parameters are arranged). With this function(s) we complete our tour or UNIX's system calls for controlling processes: fork() creates them, exec runs programs in them, exit() and wait() handle termination and wait for termination, and that's about all we need.





Franco Callari