#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
int main()
{
char *envp[]={"PATH=/tmp","USER=sunq",NULL};
char *argv[]={"ls","-l","./",NULL};
pid_t pid;
pid=fork();
if(pid==-1)
{
perror("fork");
exit(1);
}
else if(pid==0)
{
//execle("/bin/env","env",NULL,envp);
execvp("ls",argv);
}
else
{
printf("\nin the execvp process!");
}
return 0;
}