On Wed, 25 Nov 2015 15:22:27 -0500, "Ted Unangst" wrote: > I think this is the way to go, throughout games. The only things > we need to know are username (getlogin() or even $USER) and home > dir ($HOME). Digging the home dir out of passwd seems unnecessary > (or even wrong, if i've set HOME to be something else). > > For that matter, I'm not sure to prefer USER or getlogin. I'm leaning > towards USER precisely *because* it allows overriding. If I want > to keep a set of scores for different users by setting USER that > seems reasonable to me.
We should prefer the LOGNAME environment variable over the old USER. See environ(7). - todd