I know execvp can be used to execute simple commands as follows:
char* arg[] = {\"ls\", \"-l\", NULL};
execvp(arg[0],arg);
I w
Here's what happens in an execvp call:
PATH, if applicable, for the file that is to be executed. Most, if not all, commands in UNIX-like systems are executables. What will happen if it is not? Try it. Have a look at how glibc does it.execve will be made. Parts of execve may be implemented in libc or it may be a system call (like in Linux).execvp call, finds a handler appropriate for loading the binary, and sets the current task (the execvp caller) as not executing. You can find its implementation here.All steps above conform to the requirements set by POSIX which are described in the relevant manual pages.