[m-users.] How to get the environment
Peter Wang
novalazy at gmail.com
Sun Mar 24 12:34:36 AEDT 2019
On Fri, 22 Mar 2019 12:50:18 +0100, Volker Wysk <post at volker-wysk.de> wrote:
> Hi
>
> There is io.get_environment_var/4, but this gets just one environment
> variable. For the posix.exec/5 predicate, the entire environment is needed, as
> a map(string,string). There are no foreign predicates for the other variants
> of exec (such as execv), which don't require the environment.
>
> I've searched in the io and posix libraries, but couldn't find any way to
> query the entire environment. Could it be that there isn't any...?
>
Hi,
There isn't any yet, possibly because POSIX does not define any way to
do so. The foreign proc would need to read from the non-POSIX `environ'
global variable or _NSGetEnviron() on MacOS.
Peter
More information about the users
mailing list