updated读到第一个fork(),program另外copy多一个fork();printf()
so far, you have 1 parent program and exact same child program with the content---- fork(); printf();
each of them read upto second fork() will produce two children programs again, with the content---printf();(by now you will have 4 printf("hello!")
After I tried this simply program in unix, i get the answer
4
It's like a tree.
f:fork p:printf
(more...)
[AGREE]EXACTLY.