Function
GLibget_environ
since: 2.28
Description
Gets the list of environment variables for the current process.
The list is NULL terminated and each item in the list is of the
form ‘NAME=VALUE’.
This is equivalent to direct access to the ‘environ’ global variable, except portable.
The return value is freshly allocated and it should be freed with
g_strfreev() when it is no longer needed.
Available since: 2.28
Return value
Type: An array of filename
the list of environment variables.
The array is NULL-terminated. |
| The caller of the function takes ownership of the data, and is responsible for freeing it. |
| Each element is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.. |