.
if(status_2==0){
printf(\子进程结束...%d\\n\ printf(\唤醒ls子进程...%d\\n\ kill(pid_1,SIGINT);
waitpid(pid_1,&status_1,0); //等待ps子进程结束 printf(\子进程结束...%d\\n\ printf(\父进程结束...%d\\n\ exit(0); }
if(pid_2<0) // 建立子进程2失败? {
printf(\ exit(0); }
if(pid_2 == 0) // 子进程2执行代码段 {
printf(\子进程启动... %d\\n\ status_2 = execve(args_2[0],args_2,NULL); } } return 0; }
--
.
--
操作系统实验一实验报告
.if(status_2==0){printf(\子进程结束...%d\\n\printf(\唤醒ls子进程...%d\\n\kill(pid_1,SIGINT);waitpid(pid_1,&status_1,0);//等待ps子进程结束printf(\子进程结束...%d\\n\pri
推荐度:





点击下载文档文档为doc格式