I'm debugging an application in Ubuntu 20.04 with:
ltrace -e getenv ./cmd
I want to know which enviroment variables and their respective values are involved. I got surprised when I realized that there is an "empty name variable" without a value. There is the ltrace output:
....
linux_a64.installos->getenv("") = nil
linux_a64.installos->getenv("TMPDIR") = "/tmp"
linux_a64.installos->getenv("DEBUGCMD") = nil
....
Does anyone knows what this could be? There is a way to give an empty value to a enviroment variable?
Probably this environment variable wasn't set yet.
$ env | grep POTATO
$ echo $POTATO
You can get the environment variable value, even if that wasn't set before..
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.