Util.environSetenv

Sets the environment variable variable in the provided list envp to value.

struct Util
static
string[]
environSetenv
(
string[] envp
,
string variable
,
string value
,)

Parameters

envp string[]

an environment list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), or NULL for an empty environment list

variable string

the environment variable to set, must not contain '='

value string

the value for to set the variable to

overwrite bool

whether to change the variable if it already exists

Return Value

Type: string[]

the updated environment list. Free it using g_strfreev().

Meta

Since

2.32