SubprocessLauncher.setEnviron

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

Typically you will build this variable by using g_listenv() to copy the process 'environ' and using the functions g_environ_setenv(), g_environ_unsetenv(), etc.

As an alternative, you can use Subprocess.launcherSetenv, Subprocess.launcherUnsetenv, 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 Subprocess.launcherSetEnviron is called. Previously, it was copied when the subprocess was executed. This means the copied environment may now be modified (using Subprocess.launcherSetenv, 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.

class SubprocessLauncher
void
setEnviron
(
string[] env
)

Parameters

env string[]

the replacement environment

Meta

Since

2.40