我直接贴上一个问题 不过有点太简单-_-a
Consider the following code segment:
pid_tpid;
pid = fork();
if (pid == 0) { /* child process */
fork();
thread_create( . . .);
}
fork();
a. How many unique processes are created?
b. How many unique threads are created?
Answer:
There are six processes and two threads.
请问答案为何是6个processes和2个threads?
要fork前后哪一个东西该怎么看呢?
感谢