Move environment related code to a separate function. Create a new char** if ignoreEnvironment is set rather than calling clearEnv
Move environment related code to a separate function. Create a new char** if ignoreEnvironment is set rather than calling clearEnv