問題詳情

⑵int worktogether() {pid_t myid;if ((myid = vfork()) < 0) {fprintf(stderr, "vfork error"); exit() ; }else if (myid == 0) {printf("Child Process: %d.", getpid());return(0);}else {waitpid(myid,NULL,0);printf("Parent Process: %d.", getpid());}}int main() {worktogether();exit(0);}

參考答案

答案:C
難度:適中0.694896
統計:A(118),B(76),C(599),D(10),E(0)

內容推薦