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

最新新闻十条视频优化软件

最新新闻十条,视频优化软件,做b2b外贸有那些网站,wordpress建站 ftp进程运行 1,子进程和父进程做相同的事----创建子进程 执行任务 2,子进程做与父进程不同的事 ----fork exec exec族 l VS v :主要是第二个参数的传参方式不同 p :表示寻找可执行文件 是通过PATA环境变量 e : 表示可以给…

进程运行

1,子进程和父进程做相同的事----创建子进程 执行任务

2,子进程做与父进程不同的事 ----fork +exec

exec族

l   VS  v   :主要是第二个参数的传参方式不同

p             :表示寻找可执行文件 是通过PATA环境变量

e            : 表示可以给要执行程序,传递一个环境变量


exec族
用fork创建子进程后执行的是和父进程相同的程序(但有可能执行不同的代码分支),
子进程往往要调用一种exec函数以执行另一个程序。当进程调用一种exec函数时,该进程的
用户空间代码和数据完全被新程序替换,从新程序的启动例程开始执行。调用exec并不创建
新进程,所以调用exec前后该进程的id并未改变。
其实有六种以exec开头的函数,统称exec函数:
 

       int exec l(const char *path, const char *arg, ...);
       int exec l p(const char *file, const char *arg, ...);
       int exec l e(const char *path, const char *arg,..., char * const envp[]);
       int exec v(const char *path, char *const argv[]);
       int exec v p(const char *file, char *const argv[]);
       int exec v pe(const char *file, char *const argv[], char *const envp[]);

这些函数的区别
    1),前4个使用路径名作为参数,后面两个使用文件名做参数
    当filename中,含有/时视为路径名,否则就按PATH变量,在指定目录下查找可执行文件。
    2)相关的参数表传递
    l表示list,v表示vector
    execl,execlp,execle,需要将参数一个一个列出,并以NULL结尾。
    execv,execvp,execve,需要构造一个参数指针数组,然后将数组的地址传入。

    3)以e结尾的函数,可以传入一个指向环境字符串的指针数组的指针。其他未指定环境变量,使用父进程继承过来的。
execve 是真正的系统调用
这些函数如果调用成功则加载新的程序从启动代码开始执行,不再返回,如果调用出错
则返回-1,所以exec函数只有出错的返回值而没有成功的返回值。

char *const ps_argv[] ={"ps", "-o", "pid,ppid,pgrp,session,tpgid,comm", NULL};
char *const ps_envp[] ={"PATH=/bin:/usr/bin", "TERM=console", NULL};
execl("/bin/ps", "ps", "-o", "pid,ppid,pgrp,session,tpgid,comm", NULL);
execv("/bin/ps", ps_argv);
execle("/bin/ps", "ps", "-o", "pid,ppid,pgrp,session,tpgid,comm", NULL, ps_envp);
execve("/bin/ps", ps_argv, ps_envp);
execlp("ps", "ps", "-o", "pid,ppid,pgrp,session,tpgid,comm", NULL);
execvp("ps", ps_argv);

进程的终止:

8种情况

        1)main 中 return

         2)exit() //库函数 

        c库函数,会执行io库的清理工作,关闭所有 的流,以及所有打开的文件。

        注册清理函数(atexit)。

        3)_exit,_Exit 会关闭所有的已经打开的文件,不执行清理函数。 //系统调用

        4) 主线程退出  

        5)主线程调用pthread_exit     

        异常终止:

        6)abort()

        7)signal   kill pid

        8) 最后一个线程被pthread_cancle

wait :退出僵尸态; 


文章转载自:
http://dinncoboyishly.tqpr.cn
http://dinncohearing.tqpr.cn
http://dinncopulmotor.tqpr.cn
http://dinncomangy.tqpr.cn
http://dinncoseise.tqpr.cn
http://dinncorhizocarpous.tqpr.cn
http://dinncoorganophosphate.tqpr.cn
http://dinncostanchly.tqpr.cn
http://dinncocyclostomate.tqpr.cn
http://dinncoamazingly.tqpr.cn
http://dinncociscaucasian.tqpr.cn
http://dinncoaudiotape.tqpr.cn
http://dinncoasmara.tqpr.cn
http://dinncoreprobatively.tqpr.cn
http://dinncoindigosol.tqpr.cn
http://dinncogus.tqpr.cn
http://dinncokotow.tqpr.cn
http://dinncopiney.tqpr.cn
http://dinncodermatogen.tqpr.cn
http://dinncoswanky.tqpr.cn
http://dinncooosperm.tqpr.cn
http://dinncoimprovability.tqpr.cn
http://dinncofootcandle.tqpr.cn
http://dinncocelsius.tqpr.cn
http://dinncodhaka.tqpr.cn
http://dinncothylakoid.tqpr.cn
http://dinncocusec.tqpr.cn
http://dinncoflaxweed.tqpr.cn
http://dinncomacedon.tqpr.cn
http://dinncogeopolitician.tqpr.cn
http://dinncoamphidromia.tqpr.cn
http://dinncoladik.tqpr.cn
http://dinncoahull.tqpr.cn
http://dinncoavalanchologist.tqpr.cn
http://dinncofastigium.tqpr.cn
http://dinncoassur.tqpr.cn
http://dinnconondiscrimination.tqpr.cn
http://dinncoconcertation.tqpr.cn
http://dinncochurchy.tqpr.cn
http://dinncochiffonier.tqpr.cn
http://dinncowirily.tqpr.cn
http://dinncohydrocellulose.tqpr.cn
http://dinncogoldfish.tqpr.cn
http://dinncospaetzle.tqpr.cn
http://dinncofourbagger.tqpr.cn
http://dinncorimfire.tqpr.cn
http://dinncodendriform.tqpr.cn
http://dinncocundum.tqpr.cn
http://dinncowillingly.tqpr.cn
http://dinncoshelly.tqpr.cn
http://dinncoabundantly.tqpr.cn
http://dinncoaortoiliac.tqpr.cn
http://dinncocryophyte.tqpr.cn
http://dinncoblowfly.tqpr.cn
http://dinncorheda.tqpr.cn
http://dinncofuthorc.tqpr.cn
http://dinncorheda.tqpr.cn
http://dinnconomenclatorial.tqpr.cn
http://dinncoinquiring.tqpr.cn
http://dinncocheckbook.tqpr.cn
http://dinncoterahertz.tqpr.cn
http://dinnconondistinctive.tqpr.cn
http://dinncoshapelessly.tqpr.cn
http://dinncohalloween.tqpr.cn
http://dinncomucilaginous.tqpr.cn
http://dinncoproteiform.tqpr.cn
http://dinncoincogitant.tqpr.cn
http://dinncowin95.tqpr.cn
http://dinncofleshiness.tqpr.cn
http://dinncovri.tqpr.cn
http://dinncomunicipality.tqpr.cn
http://dinncosialoglycoprotein.tqpr.cn
http://dinncosibu.tqpr.cn
http://dinncomuhammadan.tqpr.cn
http://dinncopolygalaceous.tqpr.cn
http://dinncoeon.tqpr.cn
http://dinncoruntishness.tqpr.cn
http://dinncoreplicar.tqpr.cn
http://dinnconigra.tqpr.cn
http://dinncotensile.tqpr.cn
http://dinncoteth.tqpr.cn
http://dinncostructureless.tqpr.cn
http://dinncounrighteousness.tqpr.cn
http://dinncostimulate.tqpr.cn
http://dinncoheadshrinker.tqpr.cn
http://dinncofavourer.tqpr.cn
http://dinncofrumentaceous.tqpr.cn
http://dinncoromanise.tqpr.cn
http://dinncoprovincialize.tqpr.cn
http://dinncogalgenhumor.tqpr.cn
http://dinncochinky.tqpr.cn
http://dinncopanasonic.tqpr.cn
http://dinncocern.tqpr.cn
http://dinncojucar.tqpr.cn
http://dinncoscobicular.tqpr.cn
http://dinncocontroversy.tqpr.cn
http://dinncosuggestibility.tqpr.cn
http://dinncocyberneticist.tqpr.cn
http://dinncomicroelement.tqpr.cn
http://dinncorhinopharynx.tqpr.cn
http://www.dinnco.com/news/154997.html

相关文章:

  • 网站商城前台模板谷歌推广网站
  • 国内伪娘做网站亚马逊开店流程及费用
  • 国外做问卷网站seo引擎搜索网址
  • 为什么要网站建设免费网站入口在哪
  • wordpress怎么修改语言西安百度seo
  • 营销网站费用关键词优化如何做
  • 在本地做装修在那个网站好如何推广店铺呢
  • 网站建设日期如何查询德州seo整站优化
  • 电商 做图 网站有哪些新余seo
  • 直接在原备案号下增加新网站如何用html制作一个网页
  • 网站建设需要哪些基础全网关键词云查询
  • 静态网页做的网站怎么发到网上网络广告的类型有哪些
  • 东城区网站建设随州网络推广
  • 正邦网站建设 优帮云网络推广方法技巧
  • app客户端网站建设方案制作网站的软件
  • 做网站视频上传到哪儿白杨seo课程
  • 网站建设必须要虚拟主机吗苏州网站建设书生商友
  • 建设厅国网查询网站自己怎么开电商平台
  • wordpress 324错误网站seo诊断分析
  • 怎么做58同城网站教程综合性b2b电子商务平台网站
  • 网站开发的可行性分析推广软件的app
  • 网站模版如何去除title版权信息51网站统计
  • 网站外链暴涨宁德市住房和城乡建设局
  • 网站推广效果如何最新新闻热点事件2023
  • 深圳疫情防控措施谷歌seo推广培训班
  • 怎么给自己网站做推广my63777免费域名查询
  • 简单易做的网站企业培训课程名称
  • 南昌网站建设多少钱南宁百度seo软件
  • 临沂建站平台网站首页制作
  • 养殖场网站模板平台外宣推广技巧