Chinaunix首页 | 论坛 | 博客
  • 博客访问: 300515
  • 博文数量: 108
  • 博客积分: 4260
  • 博客等级: 上校
  • 技术积分: 1145
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-21 13:22
文章分类

全部博文(108)

文章存档

2011年(40)

2010年(22)

2009年(17)

2008年(29)

我的朋友

分类: LINUX

2008-03-12 16:12:46

int execl (const char *path,
const char *arg,
...);
int execlp (const char *file,
const char *arg,
...);
Running a New Process | 131
int execle (const char *path,
const char *arg,
...,
char * const envp[]);
int execv (const char *path, char *const argv[]);
int execvp (const char *file, char *const argv[]);
int execve (const char *filename,
char *const argv[],
char *const envp[]);

The mnemonics are simple. The l and v delineate whether the arguments are provided
via a list or an array (vector). The p denotes that the user’s full path is searched for the
given file. Commands using the p variants can specify just a filename, so long as it is
located in the user’s path. Finally, the e notes that a new environment is also supplied
for the new process. Curiously, although there is no technical reason for the omission,
the exec family contains no member that both searches the path and takes a new environment.
This is probably because the p variants were implemented for use by shells,
and shell-executed processes generally inherit their environments from the shell.
阅读(804) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:编译linux内核的方法

给主人留下些什么吧!~~