Message400613
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:38 | vstinner | set | recipients:
+ vstinner, pefu, blueyed, ned.deily, Arfrever, akira, serhiy.storchaka, iritkatriel |
2021-08-30 14:56:38 | vstinner | set | messageid: <1630335398.52.0.860146249199.issue20658@roundup.psfhosted.org> |
2021-08-30 14:56:38 | vstinner | link | issue20658 messages |
2021-08-30 14:56:38 | vstinner | create | |
|