摘要:
先来看以下一段代码(test.c): 1 #include<stdio.h>2 #include<sys/types.h>3 4 int main()5 {6 pid_t pid;7 fprintf(stdout,"%s","Start fork...");8 pid = fork();9 switch(pid)10 {11 case -1:12 break;13 case 0:14 printf("%s","Child process.\n");15 break;16 default:17 阅读全文