Gio.SubprocessLauncher.getenv

### Method

# Gio SubprocessLaunchergetenv

since: 2.40

#### Declaration [src]

    const gchar*
    g_subprocess_launcher_getenv (
      GSubprocessLauncher* self,
      const gchar* variable
    )

#### Description [src]

Returns the value of the environment variable `variable` in the environment of processes launched from this launcher.

On UNIX, the returned string can be an arbitrary byte string. On Windows, it will be UTF-8.

Available since: 2.40

#### Parameters

`variable`

  Type: `const gchar*`

  The environment variable to get.

  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.

#### Return value

Type: `const gchar*`

The value of the environment variable, `NULL` if unset.

The returned data is owned by the instance.
The return value can be `NULL`.
The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.