Open
Bug 204494
Opened 22 years ago
Updated 2 years ago
Provide PR_UnsetEnv()
Categories
(NSPR :: NSPR, enhancement)
Tracking
(Not tracked)
NEW
People
(Reporter: kherron+mozilla, Unassigned)
References
()
Details
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.
![]() |
||
Updated•22 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•18 years ago
|
QA Contact: wtchang → nspr
Updated•2 years ago
|
Severity: normal → S3
Comment 1•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: wtc → nobody
You need to log in
before you can comment on or make changes to this bug.
Description
•