int execve(const char *pathname, char *const argv[], char *const envp []);
i know what to pass for the first two parameters, but for envp i don't know what to pass.
Please help me.
int execve(const char *pathname, char *const argv[], char *const envp []);
i know what to pass for the first two parameters, but for envp i don't know what to pass.
Please help me.
In that case, you should probably use "execv".
what's the use of passing an environment array?
What if the program you were calling required a specific directory to be present in the path, but you didn't want to add that to the global path for the user running the program? What if the program you were calling required the presence of an environment variable in much the same way?