We are having a lot of trouble interpreting our teacher. We asked for clarification and got the following back from him
For execve, send it a environment you se
The code from Jonathan Leffler works great, except if you want to change the PWD (working directory) variable.
PWD
What I did, in order to change the working directory, was to put a chdir(..) before execve(..) and call:
chdir(..)
execve(..)
chdir("/foo/bar"); execve(argv[0], &argv[0], envp);