Open Bug 204494 Opened 23 years ago Updated 2 months ago

Provide PR_UnsetEnv()

Categories

(NSPR :: NSPR, enhancement)

enhancement

Tracking

(Not tracked)

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.
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: wtchang → nspr
Severity: normal → S3

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: wtc → nobody
Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/98bf5b032191 https://hg.mozilla.org/integration/autoland/rev/225a7cdcdab7 Revert "Bug 204494, Bug 2041004 - Add <select> pseudo elements to devtools style inspector r=devtools-reviewers,nchevobbe"

I guess the mention of 204494 in that commit was a mistake.

Yes it was a mistake, instead of this bug in the commit it should have been this https://bugzilla.mozilla.org/show_bug.cgi?id=2044945

You need to log in before you can comment on or make changes to this bug.