Subject: Re: bug#11150: getlogin test failure

From: Andrew Warshall <[email-masked]>
Date: Sun, 12 Aug 2012 12:01:32 -0400

Hi-

   I'm seeing the same issue with 8.18. Apparently xterm doesn't write
   to /var/run/utmp by default, so getlogin () fails with errno ==
   ENOENT. However, isatty (0) still succeeds. The attached patch
   (based on, though not interchangeable with, the sed command at
   http://www.linuxfromscratch.org/lfs/view/development/chapter06/coreutils.html)
   skips the test under those conditions (at least it works on my
   machine). Of course, you could alternatively take the position that
   reliance on /var/run/utmp is a bug in getlogin () in gnulib; but
   then I don't know how to fix it.

      -Andrew Warshall