October 2018
Beginner
794 pages
19h 23m
English
The execlp is a slight variation on the execl:
int execlp(const char *file, const char *arg, ...);
As before, the l in execlp implies a long format variable argument list; the p implies that the environment variable PATH is searched for the program to execute. As you are probably aware, the PATH environment variable consists of a set of colon-delimited (:) directories to search for the program file to run; the first match is the program that is executed.
For example, on our Ubuntu VM (where we are logged in as the user seawolf):
$ echo $PATH/home/seawolf/bin:/home/seawolf/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games$
Thus, if you execute a process via the execlp, you ...
Read now
Unlock full access