get_environ


Description:

[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "2.28" ) ]
public unowned string[] get_environ ()

Gets the contents of the 'environ' variable of the command line invocation, as would be returned by @get, ie as a null-terminated list of strings in the form 'NAME=VALUE'.

The strings may contain non-utf8 data.

The remote application usually does not send an environment. Use g_application_send_environment to affect that. Even with this flag set it is possible that the environment is still not available (due to invocation messages from other applications).

The return value should not be modified or freed and is valid for as long as this exists.

See getenv if you are only interested in the value of a single environment variable.

Parameters:

this

a ApplicationCommandLine

Returns:

the environment strings, or null if they were not sent




2022 vala-language.org