成功时,子进程的PID在父进程的执行中返回,并在子进程的执行中返回0.
p = fork();
我对它的手册页感到困惑,p等于0或PID?
p
0
PID
c linux fork
c ×1
fork ×1
linux ×1