Method

GioSubprocessLaunchersetenv

since: 2.40

Declaration

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

Description

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 function.
The value is a file system path, using the OS encoding.
value

Type: const gchar*

The new value for the variable.

The data is owned by the caller of the function.
The value is a file system path, using the OS encoding.
overwrite

Type: gboolean

Whether to change the variable if it already exists.