int execv(const char *path, char *const argv[]); Like all of the exec functions, execv replaces the calling process image with a new process image. This has the effect of running a new program with the process ID of the calling process. The command-line arguments are passed to the function as an array (Vector) of pointers.
The POSIX standard declares exec functions in the unistd.h
header file, in C language. The same functions are declared in process.h
for DOS and Microsoft Windows.
When execv()
is successful, it doesn't return; otherwise, it returns -1 and sets errno.