]> git.proxmox.com Git - wasi-libc.git/commit
Add a function to de-initialize the environment-variable state.
authorDan Gohman <dev@sunfishcode.online>
Thu, 11 Mar 2021 15:26:31 +0000 (07:26 -0800)
committerDan Gohman <dev@sunfishcode.online>
Tue, 25 May 2021 22:25:05 +0000 (15:25 -0700)
commit82fc2c4f449e56319112f6f2583195c7f4e714b1
tree4d6dfebe5e946c39ef9b64fb0536bb53cc4b613e
parent659ff414560721b1660a19685110e484a081c3d4
Add a function to de-initialize the environment-variable state.

Add a `__wasilibc_deinit_environ` function which clears the current
environment variable state to the state where next time the environment
variable functions are called, they'll reinitialize the environment.

And add a `__wasilibc_maybe_reinitialize_environ_eagerly` function to
reinitialize the environment variable state if `environ` or `_environ`
are needed.

These functions are needed by wizer to be able to suspend and resume
a program and have it read new environment variables from the host
environment; see bytecodealliance/wizer#8 for background.
expected/wasm32-wasi/defined-symbols.txt
libc-bottom-half/headers/private/stdlib.h
libc-bottom-half/headers/public/wasi/libc-environ.h
libc-bottom-half/sources/__wasilibc_initialize_environ.c
libc-bottom-half/sources/environ.c