GETLOGIN(3C) DOMAIN/IX Reference Manual (SYS5) GETLOGIN(3C)
NAME
getlogin - get log-in name
USAGE
char *getlogin ( );
DESCRIPTION
Getlogin returns a pointer to the user's log-in name. This
function can be used in conjunction with getpwnam to locate
the correct password file entry when several log-in names
share the same user ID.
If getlogin is called within a process that is not attached
to a terminal, it returns a NULL pointer. The correct pro-
cedure for determining the log-in name is to call cuserid,
or to call getlogin and if it fails, then call getpwuid.
NOTES
The return values point to static data, whose content is
overwritten by each call.
DIAGNOSTICS
The function returns a NULL pointer if the log-in name is
not found.
RELATED INFORMATION
cuserid(3S), getgrent(3C), getpwent(3C)
Printed 5/10/85 GETLOGIN-1