Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Coherent 3.1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


getlogin()               General Function              getlogin()




Get login name

char *getlogin()

The name  corresponding to the current user id  is not always the
same as the name under which a user logged into the COHERENT sys-
tem.   For example,  the user  may have issued  a su  command, or
there may be several login names associated with a user id.  get-
login returns the login name found in the file /etc/utmp.

In  cases where  getlogin  fails to  produce  a result,  getpwuid
(described in  getpwent) is normally  used to determine  the user
name for a process.

***** Files *****

/etc/utmp  login names

***** See Also *****

general functions,  getpwent(), getuid(), su,  ttyname(), utmp.h,
who

***** Diagnostics *****

getlogin returns NULL if the login name cannot be determined.

***** Notes *****

getlogin  stores  the returned  name  in a  static  area that  is
destroyed by subsequent calls.

























COHERENT Lexicon                                           Page 1


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026