#include <unistd.h> int execl(const char *path, const char *argv0, ...); int execle(const char *path, const char *argv0, ... /*, char *const envp[] */); int execlp(const char *path, const char *argv0, ...); int execlpe(const char *path, const char *argv0, ... /*, char *const envp[] */); int execv(const char *path, char *const argv[]); int execve(const char *path, char *const argv[], char *const envp[]); int execvp(const char *path, char *const argv[]); int execvpe(const char *path, char *const argv[], char *const envp[]);
These functions operate by calling spawn*
with a type of
P_OVERLAY
. Refer to section spawn* for a full description.
If successful, these functions do not return. If there is an error,
these functions return -1 and set errno
to indicate the error.
not ANSI, POSIX
execlp("gcc", "gcc", "-v", "hello.c", 0);
Go to the first, previous, next, last section, table of contents.