Method

GioSubprocessLaunchersetenv

since: 2.40

Declaration [src]

void
g_subprocess_launcher_setenv (
  GSubprocessLauncher* self,
  const gchar* variable,
  const gchar* value,
  gboolean overwrite
)

Description [src]

Sets the environment variable variable in the environment of processes launched from this launcher.

On UNIX, both the variable’s name and value can be arbitrary byte strings, except that the variable’s name cannot contain ‘=’. On Windows, they should be in UTF-8.

Available since: 2.40

Parameters

variable

Type: const gchar*

The environment variable to set, must not contain ‘=’.

The data is owned by the caller of the method.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.
value

Type: const gchar*

The new value for the variable.

The data is owned by the caller of the method.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.
overwrite

Type: gboolean

Whether to change the variable if it already exists.