Amaury Forgeot d Arc <[email protected]> added the comment:

os.putenv() calls the libc function.
To start interactive mode, CPython calls the libc function getenv(), and 
retrieve the value.

OTOH in pypy we use the applevel os.getenv() which reads os.environ, which was 
built from a 
snapshot of the environment at interpreter startup.

The solution could be to access the *RPython-level* os.environ[]: this one 
calls the libc 
getenv() on each item access (thanks to the magic in ll_os_environ.py)
Maybe expose this as posix._getenv(), and use it in app_main.py.

tag:easy

----------
nosy: +amaury
status: unread -> chatting

________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1518>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to