New submission from STINNER Victor <vstin...@python.org>:

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().

----------
components: Library (Lib)
messages: 360365
nosy: vstinner
priority: normal
severity: normal
status: open
title: Implement os.putenv() with setenv() if available
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39406>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to