Linux exec方法族简单用法
MAN (Manual pager utils) :
execl, execlp, execle, execv, execvp ,execve- execute a file
#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[]);
int execve(const char *filename, char *const argv[], char *const envp[]);
char*argv[] ={"ls", "-l",".", NULL};char*envp[] ={ NULL};execve("/bin/ls", argv, envp);