摘要:
参考APUE中第1章1.6小节主要涉及到2个函数: fork、exec[cpp]view plaincopy//filename:process_ctrl.c//childprocess--fork,exec,waitpid#include#include#defineMAXLINE32intmain(intargc,char*argv[]){charbuf[MAXLINE];pid_tpid;intstatus;printf("parent:pid=%d\n",getpid());printf("%%");while(fgets(buf,MAXLINE 阅读全文