进程运行的三种状态

exec函数族
可以在一个程序中执行另外一个程序
函数原型:intexecl(const char*pathname,const char *arg,…/*(char *)NULL*/);
函数原型:intexeclp(const char *file,const char *arg,…/*(char *)NULL */);
execlp会使用系统的$PATH环境变量,execl不会使用环境变量
注意:exec函数族的最后一个是参数一定是”NUILL“
文章介绍了exec函数族,包括execl和execlp,它们允许在已运行的程序中执行新的程序。execlp会利用$PATH环境变量查找可执行文件,而execl则不使用。执行exec函数时,参数列表必须以NULL结尾。
进程运行的三种状态

exec函数族
可以在一个程序中执行另外一个程序
函数原型:intexecl(const char*pathname,const char *arg,…/*(char *)NULL*/);
函数原型:intexeclp(const char *file,const char *arg,…/*(char *)NULL */);
execlp会使用系统的$PATH环境变量,execl不会使用环境变量
注意:exec函数族的最后一个是参数一定是”NUILL“

被折叠的 条评论
为什么被折叠?