Function Prototypes:
Describe:
The EXEC () series function replaces the current process image with a new process image.
There is no difference in how things work, only the way the parameters are passed.
Description
1. These 6 functions can be divided into two main categories: the Execl () series and the Execv () series.
2. ' l ' means that all parameters passed to the program are listed in sequence (list).
' V ' means putting all the parameters into a container (array, vector) and then passing in once.
Whether the list comes out or the vector them all, the last of the arguments must be a null pointer ((char*) 0).
3. EXECL () and EXECV () that do not end in P/E use the absolute Path (path) to execute the file given by the 1th parameter.
3. ' P ' means that the 1th parameter is located in the default environment variable path , and only the file name is indicated by the filename.
' E ' means that the 1th parameter is in the given ENVP environment variable . The pending file is given with an absolute path (path) .
4. Note arg0: should always be the file name to be executed, remember the main () function of the argv[0] is what?
Example:
Example code: HTTP://ALIOSS.TWOFEI.COM/LINUX/BEGIN/EXEC.C
Instructions for using EXEC () to perform file series functions in Linux