October 2018
Beginner
794 pages
19h 23m
English
Now that we have understood the exec semantics, it's time we saw how to perform the exec operation programmatically. Unix and Linux provide several C APIs, seven in fact, that all ultimately do the same job: They have the predecessor process exec the successor.
So, there are seven APIs that all do the same thing? Mostly, yes; hence they are called the exec family of APIs.
Lets take a look at them:
#include <unistd.h>extern char **environ;int execl(const char *path, const char *arg, ...);int execlp(const char *file, const char *arg, ...);int execle(const char *path, const char *arg, ..., char * const envp[]);int execv(const char *path, char *const argv[]);int execvp(const char *file, char *const argv[]); ...Read now
Unlock full access