NSPR provides a function called PR_SetEnv() to create/change an environment variable. However, there's no documented method for removing a variable from the environment. prenv.h notes correctly that the string passed to PR_SetEnv() must be persistant, because the function can be implemented through putenv() which incorporates the original buffer into the environment. This is true even if the buffer contains "NAME=", i.e. the caller is attempting to invalidate the envvar. This is a problem for a module that wants to create an environment variable and then remove it later. After creating a variable the buffer containing the variable can be swapped for a new one, but there's no way to completely withdraw memory controlled by the module from the environment, e.g. as a prelude to unloading the module from memory. See bug 194761 comment 7 and later for a module affected by this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.