exec函数
来源:互联网 发布:易企秀免费下载 mac 编辑:程序博客网 时间:2024/05/21 19:32
用fork函数创建子进程后,子进程往往要调用一种exec函数以执行另一个程序。当进程调用一种exec函数时,该进程执行的程序完全替换为新的程序,而新的程序则从其main函数开始执行。因为调用exec并不创建新进程,所以前后的进程ID并未改变。exec只是用一个全新的程序替换了当前进程的正文、数据、堆和栈段。
#include<unistd.h>
int execl(const char *pathname, const char *arg0, ..../* (char *)0 */);
int execv(const char *pathname, const char *const argv[]);
int execle(const char *pathname, const char *arg0, ..../* (char *)0 , char *cost envp[] */);
int execve(const char *pathname, const char *const argv[], char *const envp[]);
int execlp(const char *filename, const char *arg0, ..../* (char *)0 */);
int execvp(const char *filename, const char *const argv[]);
- exec函数
- exec 函数
- exec函数
- exec函数
- exec函数
- exec函数
- exec函数
- exec函数
- exec函数
- exec函数
- exec函数
- exec函数
- exec函数
- exec 函数
- exec函数
- exec函数
- exec函数
- exec函数
- 新浪微博Python SDK笔记——准备工作
- boost 字符串和文本处理库概述
- boost 容器概述
- boost 迭代器概述
- boost 算法概述
- exec函数
- InnoDB 主键的选择:自增ID & 业务ID
- VS C#程序打包覆盖安装不能更新的解决方法
- hdu1194-Beat the Spread!
- 线段树或树状数组求逆序数
- 【异常】Android中使用localhost:8080或者172.0.0.1:8080访问本地服务器org.apache.http.conn.HttpHostConnectException异常
- 局部特征(1)——入门篇
- boost 函数对象和高阶编程概述
- Java命令行运行参数说明大全