set_environ


Description:

public void set_environ (string[] env)

Replace the entire environment of processes launched from this launcher with the given 'environ' variable.

Typically you will build this variable by using list_variables to copy the process 'environ' and using the functions set_variable, unset_variable, etc.

As an alternative, you can use setenv, unsetenv, etc.

Pass an empty array to set an empty environment. Pass null to inherit the parent process’ environment. As of GLib 2.54, the parent process’ environment will be copied when set_environ is called. Previously, it was copied when the subprocess was executed. This means the copied environment may now be modified (using setenv, etc.) before launching the subprocess.

On UNIX, all strings in this array can be arbitrary byte strings. On Windows, they should be in UTF-8.

Parameters:

this

a SubprocessLauncher

env

the replacement environment