Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!usc!gem.mps.ohio-state.edu!rpi!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: gnu.emacs.bug Subject: Re: bug in GNU emacs Message-ID: <1989Oct5.170825.26979@rpi.edu> Date: 5 Oct 89 17:08:25 GMT References: <8910051019.AL27323@unido.informatik.uni-dortmund.de> Distribution: gnu Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 28 [More UUCP bouncing. IcK.] In <8910051019.AL27323@unido.informatik.uni-dortmund.de> Gottfried Klein writes: GK> a minor bug is integrated in our version 18.51 of GNU emacs: GK> When getting a shell and invoking "who am i" nothing happens. It isn't precisely a bug with Emacs. "who am i" uses the getlogin() routine which has some limitations: getlogin() does not work for processes running under a pty (for example, emacs shell buffers, or shell tools) unless the program ``fakes'' the login name in the /etc/utmp file. [From the SunOS 4.0.3 manual page for getlogin()] You may have observed similar problems with ftp in a shell buffer. The ftp code can come up with "nobody" as the default login name because the getlogin() call fails but no attempt is made to then get the name of the process owner ( getpwuid(getuid())->pw_name, for example ). This apparently has changed in recent SunOS releases, at least, because I just tried it and it worked fine. It could be argued, though not in this forum, that Emacs should attempt to fake the /etc/utmp entry. Dave -- (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))