fork
main(){fork;fork;fork;printf{"hello"};}
能解释下执行流程吗
[解决办法]
#include <unistd.h>#include <stdio.h>void main(){ pid_t pid1, pid2, pid3; pid1=fork(); pid2=fork(); pid3=fork(); printf("the pid is%d pid1=%d pid2=%d pid3=%d\n",getpid(),pid1, pid2, pid3);}