What does the ve
in execve
mean?
I read through man execve
but didn't see what it means. I gather it might be "vector" but not sure. What does the ve
mean?
execve()
is a POSIX (and UNIX systems in general) function of the family of the exec*()
functions that replace the current process image.
The v
comes from the fact that it takes an argument argv
to the vector of arguments to the program (the same way the main
function of a C program may take it).
The e
comes from another of its arguments, envp
, which is similarly a vector of the environment variables (key/value pairs like LANG=en_US.UTF-8
).
For more information, see for instance the Open Group's docs on exec*()
.
From Wikipedia we can see that:
Some implementations provide these functions named with a leading underscore (e.g. _execl).
The base of each is exec (execute), followed by one or more letters:
e – An array of pointers to environment variables is explicitly passed to the >new process image.
l – Command-line arguments are passed individually (a list) to the function.
p – Uses the PATH environment variable to find the file named in the file >argument to be executed.
v – Command-line arguments are passed to the function as an array (vector) of pointers.
In the execl, execlp, execv, and execvp calls, the new process image inherits the current environment variables. (Emphasis mine.)
So your suspicions are correct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With