Fork () function

How does a process generates Child process using Fork() function.The concept of it.
For example: A process execute the code
fork()
fork()
fork()
Total Number of "child" process created is/are ?

Questions by sharad kumar sharma

Showing Answers 1 - 6 of 6 Answers

Barun

  • May 25th, 2012
 

The number of Child Processes Created would be
2^(No. of Fork() functions called)

So in the example given it would be
2^3 = 8 Child Processes

Amit G

  • May 29th, 2012
 

2^3 = 8 , agreed -> but 1 will be the parent process , so the child processes is 7

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions