Hello, i'm a newbie to Linus so there are many commands that keep me questioning.
My task is to write a program that will execute a list of commands from a text file. Everything go smooth except for the command execve, its prototype is something like
int execve ( char *filename , char *argv , char *envp ) ; what i don't get it here is the third argument envp, i read online reference and some said it was predefined in unistd.h library, so i included the library but the command still didn't work, so i went on declaring globally:
extern char ** environ ; and passed that to excecve's 3rd argument and now it works, but i don't know if i made any mistakes, and the program may went wrong in some cases, can anyone please explain more clearly to me what is this environment variable :-/