This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2020-01-21.08:30:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579595402.07.0.326081279431.issue39406@roundup.psfhosted.org>
In-reply-to
Content
Currently, os.putenv() is always implemented with putenv(). The problem is that putenv(str) puts directly the string into the environment, the string is not copied. So Python has to keep track of this memory.

In Python 3.9, this string is now cleared at Python exit, without unsetting the environment variable which cause bpo-39395 crash.

I propose to implement os.putenv() with setenv() if available, which avoids bpo-39395 on platforms providing setenv().
History
Date User Action Args
2020-01-21 08:30:02vstinnersetrecipients: + vstinner
2020-01-21 08:30:02vstinnersetmessageid: <1579595402.07.0.326081279431.issue39406@roundup.psfhosted.org>
2020-01-21 08:30:01vstinnerlinkissue39406 messages
2020-01-21 08:30:01vstinnercreate