Creates or overwrites a variable in the host (or master) environment, which does not affect any NLM applications that are currently loaded.
#include <stdlib.h>
int flushenv (
const char *string,
int overwrite);
(IN) Points to a string that contains the name of an environment variable and its value in the form:
"name=value"
The “name” is composed of characters in 7-bit ASCII and can be up to ENV_NAME_MAX (80) characters in length. The name is followed by an equal sign (0x3D), and it is followed by “value,” which is an ASCIIZ string.
(IN) Specifies what action flushenv takes, if the variable already exists in the host environment:
If successful, returns 0. Otherwise, returns a -1 and sets errno to one of the following:
The flushenv function does not change the application's environment.It changes the environment for the applications that are loaded after the function is called.
WARNING:Calling flushenv can be potentially destabilizing or even destructive to a server. You should fully understand how flushenv works before calling it.