Why do we need fork to create new process

Posted by user3671483 on Programmers See other posts from Programmers or by user3671483
Published on 2014-06-11T17:20:32Z Indexed on 2014/06/11 21:38 UTC
Read the original article Hit count: 507

Filed under:
|
|

In Unix whenever we want to create a new process, we fork the current process i.e. we create a new child process which is exactly the same as the parent process and then we do exec system call to replace the child process with a new process i.e. we replace all the data for the parent process eith that for the new process. Why do we create a copy of the parent process in the first place and why don't we create a new process directly? I am new to Unix please explain in lay-man terms.

© Programmers or respective owner

Related posts about operating-systems

Related posts about unix