It is said that fork
system call creates a clone of the calling process, and then (usually) the child process issues execve
system call to change its i
What does
execve
stand for?
The 6 variations of the exec functions in C are are exec{l,v}{,e,p}
. See function prototypes below for details.
Command-line arguments
v
- Command-line arguments are passed to the function as an array (vector) of pointers.l
- Command-line arguments are passed individually (a list) to the function.Environment variables (optional)
e
- An array of pointers to environment variables is explicitly passed to the new process imageLocate the file to be executed (optional)
p
- Uses the PATH environment variable to find the file named in the file argument to be executedint execl (char const *path, char const *arg0, ...);
int execle(char const *path, char const *arg0, ..., char const *envp[]);
int execlp(char const *file, char const *arg0, ...);
int execv (char const *path, char const *argv[]);
int execve(char const *path, char const *argv[], char const *envp[]);
int execvp(char const *file, char const *argv[]);
Source