Difference between exec, execvp, execl, execv?

Summary: In your case I would recommend to use execvp. To find out the differences between the exec* functions you should read the documentation:https://linux.die.net/man/3/exechttps://linux.die.net/man/2/execve The difference between execl* and execv* is the argument passing. execl* require a list of arguments while execv* require a vector of arguments.A list of arguments is useful if you know … Read more

How to use execvp()

The first argument is the file you wish to execute, and the second argument is an array of null-terminated strings that represent the appropriate arguments to the file as specified in the man page. For example: