exec Family: execve
execve()
uses filename, argument array and provided ENV to execute the program.
It only takes a filename to invoke the program, and it is searched in paths specified in $PATH
in sequence.
The arguments are listed in an array of char*
and passed to the function.
The new sets of environment variables are declared in an array of char*
and passed to the program in the function. They can be used to change the behaviour of the new program, for example, ls
in this example.
Last updated