Author vstinner
Recipients Arfrever, akira, blueyed, iritkatriel, ned.deily, pefu, serhiy.storchaka, vstinner
Date 2021-08-30.14:56:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2021-08-30 14:56:38vstinnersetrecipients: + vstinner, pefu, blueyed, ned.deily, Arfrever, akira, serhiy.storchaka, iritkatriel
2021-08-30 14:56:38vstinnersetmessageid: <>
2021-08-30 14:56:38vstinnerlinkissue20658 messages
2021-08-30 14:56:38vstinnercreate