Reputation: 548
As we are taught in the class that new processes are created using fork() or exec() system calls.
Suppose we created a child process using fork(), what is the purpose of this newly created process? why we created that process?
I am asking about the applications where we have to create a new process.
Upvotes: 0
Views: 280
Reputation: 21
A few example uses of creating new processes:
ls
) is its own binary file. The main shell program will fork()
and then execute the relevant utility.fork()
to handle separate requests.There are many others, but these are some examples of when you might need to use multiple processes in a program.
Upvotes: 0