Hi Ken,
/var/mail/$USER Location of the system mail drop.
But we don't actually use $USER (we call getpwuid(getuid()) and use
that).
And even then it's not that simple.
I personally interpreted the use of $USER as "the username goes here",
not "we use the value of the $USER environment variable". But I admit
that this is not clear.
I'd interpret it as being able to do `USER=notme inc'.
Should we simplify the code to demand $LOGNAME exists and use that?
POSIX, he say
LOGNAME
The system shall initialize this variable at the time of login
to be the user's login name. See <pwd.h>. For a value of
LOGNAME to be portable across implementations of POSIX.1-2017,
the value should be composed of characters from the portable
filename character set.
--
Cheers, Ralph.
--
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers