4 ms·
This quote is about execlp(), execvp() and execvpe() functions, which are supposed to emulate what shell does. POSIX has similar wording: > In the cases where
by jwilk 6y ago
This quote is about execlp(), execvp() and execvpe() functions, which are supposed to emulate what shell does.
POSIX has similar wording:
> In the cases where the other members of the exec family of functions would fail and set errno to [ENOEXEC], the execlp() and execvp() functions shall execute a command interpreter and the environment of the executed command shall be as if the process invoked the sh utility using execl() as follows:
execl(<shell path>, arg0, file, arg1, ..., (char *)0);
> where <shell path> is an unspecified pathname for the sh utility, file is the process image file, and for execvp(), where arg0, arg1, and so on correspond to the values passed to execvp() in argv[0], argv[1], and so on.
https://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html https://pubs.opengroup.org/onlinepubs/9699919799/functions/e...