On Jun 3, 2019, at 8:06 AM, Ken Hornstein <k...@pobox.com> wrote: > > I am thinking that falling back to getpwuid(getuid()) is the most reasonable > approach, for the following reasons:
This fails when there are multiple users with the same uid as getpwuid() will likely fetch the first matching entry. On FreeBSD (& May be other BSDs) getlogin() is a syscall and works correctly without a controlling terminal. But I was forgetting about Linux which never disappoints in disappointing. I think use of $LOGNAME as a fallback may be good enough. -- nmh-workers https://lists.nongnu.org/mailman/listinfo/nmh-workers