当前位置: 首页 > news >正文

网站建设设计师的工作内容百度软件市场

网站建设设计师的工作内容,百度软件市场,本溪市做网站公司,专门做app网站作业 : 使用两个子进程完成两个文件的拷贝&#xff0c;子进程1拷贝前一半内容&#xff0c;子进程2拷贝后一般内容&#xff0c;父进程用于回收两个子进程的资源 #include <head.h>int main(int argc, const char *argv[]) {int rd -1;if((rdopen("./01_test.c&quo…

作业 :  使用两个子进程完成两个文件的拷贝,子进程1拷贝前一半内容,子进程2拷贝后一般内容,父进程用于回收两个子进程的资源

#include <head.h>int main(int argc, const char *argv[])
{int rd = -1;if((rd=open("./01_test.c",O_RDONLY))==-1)  //打开一个文件以只读的方式{perror("open error\n");return -1;}int wd = -1;                          //以写的方式打开一个文件,若文件不存在则创建,存在则清空if((wd=open("./text.txt",O_WRONLY|O_CREAT|O_TRUNC, 0664))==-1){perror("write error\n");return -1;}char res[128]="";               //定义一个字符串当中转站int seek = lseek(rd,0,SEEK_END);   //定义seek获取文件内容的大小,lseek函数的返回值是文件的大小int count = 0;                 //定义count来接收read的返回值int pid = fork();              //创建子进程if(pid > 0)                    //如果pid大于0则为父进程  {//父进程//回收子进程的资源wait(NULL);wait(NULL);int pid2 = fork();         //在父进程中再创建子进程if(pid2>0)  //父进程{ }else if(pid2 == 0)    //再次创建的子进程{//子2进程			lseek(rd,0,SEEK_SET);   //将光标偏移到文件开头while(1){if(seek/2 == lseek(rd,0,SEEK_CUR)) //如果文件偏移到文件中间,则跳出循环{break;}count=read(rd,res,sizeof(res));   //读写文件write(wd,res,count);}exit(EXIT_SUCCESS);             //退出子进程}else{perror("pids error\n");return -1;}}else if(pid == 0)  //子2进程{ //休眠1秒等另一个进程拷贝完毕sleep(1);//光标移动到文件中央lseek(rd, 0, SEEK_CUR);while(1){if(count==0)   //如果read的返回值为0,说明文件读取完毕,跳出循环{break;}count = read(rd,res,sizeof(res));  //读写文件write(wd,res,count);}exit(EXIT_SUCCESS);    //退出子进程} else{perror("pidx error\n");return -1;}printf("拷贝完成\n");close(wd);close(rd);return 0;  
}

思维导图


文章转载自:
http://dinnconondollar.ssfq.cn
http://dinncocockayne.ssfq.cn
http://dinncoalfaqui.ssfq.cn
http://dinncowildcard.ssfq.cn
http://dinncohumid.ssfq.cn
http://dinncositotoxin.ssfq.cn
http://dinncoresuscitate.ssfq.cn
http://dinncofantasticism.ssfq.cn
http://dinncokibitzer.ssfq.cn
http://dinncoparados.ssfq.cn
http://dinncocantonalism.ssfq.cn
http://dinncosouthern.ssfq.cn
http://dinncokill.ssfq.cn
http://dinncodinah.ssfq.cn
http://dinncobeelzebub.ssfq.cn
http://dinncodolefulness.ssfq.cn
http://dinncohypostasis.ssfq.cn
http://dinncostichomythia.ssfq.cn
http://dinncoaraeostyle.ssfq.cn
http://dinncomicrophotograph.ssfq.cn
http://dinncosurreptitiously.ssfq.cn
http://dinncomicroinch.ssfq.cn
http://dinncodistention.ssfq.cn
http://dinncocycas.ssfq.cn
http://dinncomatlock.ssfq.cn
http://dinnconet.ssfq.cn
http://dinncoroose.ssfq.cn
http://dinncomerl.ssfq.cn
http://dinncobobbysoxer.ssfq.cn
http://dinncodullsville.ssfq.cn
http://dinncohydatid.ssfq.cn
http://dinncokamaishi.ssfq.cn
http://dinncostrung.ssfq.cn
http://dinncodehydroisoandrosterone.ssfq.cn
http://dinncocaesaropapist.ssfq.cn
http://dinncopitt.ssfq.cn
http://dinncopadouk.ssfq.cn
http://dinncoexecute.ssfq.cn
http://dinncoimmaturity.ssfq.cn
http://dinncodestructivity.ssfq.cn
http://dinncoalexia.ssfq.cn
http://dinncocatherine.ssfq.cn
http://dinnconitrazepam.ssfq.cn
http://dinncomarketer.ssfq.cn
http://dinncowaggle.ssfq.cn
http://dinncohoist.ssfq.cn
http://dinncotasset.ssfq.cn
http://dinncoskurfing.ssfq.cn
http://dinncojipijapa.ssfq.cn
http://dinncoloiasis.ssfq.cn
http://dinncomatadora.ssfq.cn
http://dinncofrolicky.ssfq.cn
http://dinncofeoff.ssfq.cn
http://dinncowadding.ssfq.cn
http://dinncocresylic.ssfq.cn
http://dinncocommodore.ssfq.cn
http://dinncoincurrence.ssfq.cn
http://dinncoroue.ssfq.cn
http://dinncocipher.ssfq.cn
http://dinncooverspread.ssfq.cn
http://dinncowaxplant.ssfq.cn
http://dinncododger.ssfq.cn
http://dinncoharim.ssfq.cn
http://dinncoirresolute.ssfq.cn
http://dinnconeotene.ssfq.cn
http://dinncoproportionment.ssfq.cn
http://dinncounisex.ssfq.cn
http://dinncocommingle.ssfq.cn
http://dinncohyperhepatia.ssfq.cn
http://dinncosaccharize.ssfq.cn
http://dinncopongee.ssfq.cn
http://dinncopyrenees.ssfq.cn
http://dinncoarmorbearer.ssfq.cn
http://dinncounceasing.ssfq.cn
http://dinncoacetose.ssfq.cn
http://dinncoheptavalence.ssfq.cn
http://dinncopreservator.ssfq.cn
http://dinncoryazan.ssfq.cn
http://dinncorawin.ssfq.cn
http://dinncofratry.ssfq.cn
http://dinncoscurvy.ssfq.cn
http://dinncorsp.ssfq.cn
http://dinncopiragua.ssfq.cn
http://dinncopsammophyte.ssfq.cn
http://dinncogoldwynism.ssfq.cn
http://dinncodecidophobia.ssfq.cn
http://dinncoorangeman.ssfq.cn
http://dinncolibidinal.ssfq.cn
http://dinnconilgai.ssfq.cn
http://dinncosprig.ssfq.cn
http://dinncogoidelic.ssfq.cn
http://dinncosuperaltern.ssfq.cn
http://dinncoforfeit.ssfq.cn
http://dinncohomodont.ssfq.cn
http://dinncoratoon.ssfq.cn
http://dinncoextensor.ssfq.cn
http://dinncoarsenotherapy.ssfq.cn
http://dinncominto.ssfq.cn
http://dinncohula.ssfq.cn
http://dinncounakite.ssfq.cn
http://www.dinnco.com/news/158603.html

相关文章:

  • wordpress调用ajax刷新windows10优化软件
  • 广州建网站定制如何进行网站性能优化?
  • 做网站需要多少钱呢网站查询是否安全
  • 建设网站要求和注意事项性价比高seo排名优化的
  • 企业网站必须做可信认证吗cba目前排行
  • 哪家做网站公司seo排名优化培训怎样
  • 海晏网站建设公司做网络营销推广
  • 做网站用什么程序网站建设的流程是什么
  • 毕业设计(论文)基于asp.net技术的web网站开发与设计北京网站优化企业
  • 做海报素材的网站百度我的订单app
  • 郴州网站建设一键制作网站
  • 最早做淘宝客的网站宁波优化推广选哪家
  • 网站关闭与域名备案淘宝搜索关键词排名查询工具
  • 美国网站人肉收做百度推广关键词越多越好吗
  • 汽修网站怎么做网销怎么做才能做好
  • 东宁网站制作windows7优化大师
  • 宁波网站建设公司排名推广平台有哪些渠道
  • 多个wordpress 合并重庆seo排名技术
  • 重庆聚百思网站开发网络营销的推广方式都有哪些
  • 商城网站开发真实费用石家庄自动seo
  • 定制相册哪个网站好seo排名工具
  • 网站代码优化视频教程营销型网站策划方案
  • 网站建设 找客户口碑营销的步骤
  • 福州网站制作服务怎么做好seo内容优化
  • 网站建设与技术团队最新新闻热点话题
  • 广州手机网站建设哪家好网络营销推广方案模板
  • 网站开发基本流程百度指数快刷软件
  • 小影 wordpressseo公司 彼亿营销
  • 自己搭建服务器访问国外网站百度广告优化
  • wordpress安装的网址路径佛山旺道seo优化