Subject: Empty environment variables
To: None <current-users@NetBSD.ORG>
From: David Jones <email@example.com>
Date: 06/28/1995 13:16:17
What is the correct behavior wrt "empty" environment variables?
e.g. I have a variable "EDITOR=" in my environment. There is no value,
but the string itself is in the environment. getenv() probably returns
a pointer to "" (null byte).
I tried using vipw in this situation, and vipw could not launch the editor.
After unsetting EDITOR, vipw worked OK.
So, should programs be aware of "", or should getenv() return NULL if it
finds "", or should such a situation simply be declared illegal?
David Jones, M.A.Sc student, Electronics Group (VLSI), University of Toronto
email: firstname.lastname@example.org, finger for PGP public key
For a good time, telnet torfree.net and log in as `guest'.