STINNER Victor <vstin...@python.org> added the comment:
Attached set_unset_env.c program calls putenv("=hello world") and then unsetenv(""). On my Fedora 34 with glibc-2.33-20.fc34.x86_64, putenv() succeed, but unsetenv() fails. --- $ gcc set_unset_env.c -g -o set_unset_env && ./set_unset_env putenv("=hello world") -> hello world ERROR: unsetenv("") failed: [error 22] Invalid argument --- By the way, getenv() fails to find an environment variable if its name is empty: I reimplemented getenv() using the 'environ' variable for my test. ---------- Added file: https://bugs.python.org/file50245/set_unset_env.c _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue20658> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com