所以我必须找到使用该fork()方法的代码的输出.我认为输出是5"你好",但我得到8.为什么?这是代码:
#include "csapp.h"
void doit()
{
Fork();
Fork();
printf("hello\n");
return;
}
int main()
{
doit();
printf("hello\n");
exit(0);
}
Run Code Online (Sandbox Code Playgroud)