Passing Environment Variables – envp[]

The environment parameter is a list of character strings in the form name=value, where name is the name of the environment parameter and value is the value to which you want it set. These strings make up the environment of the new process image. The last entry in the environment list must be the NULL pointer.

If you want the child to inherit the environment of the parent, you can specify the external variable environ in the spawn() call.