ultrix man page for getlogin

Query: getlogin

OS: ultrix

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

getlogin(3)						     Library Functions Manual						       getlogin(3)

Name
       getlogin - get login name

Syntax
       char *getlogin()

Description
       The subroutine returns a pointer to the login name as found in It may be used in conjunction with to locate the correct password file entry
       when the same userid is shared by several login names.

       If is called within a process that is not attached to a typewriter, it returns NULL.  The correct procedure for determining the login  name
       is to first call and if it fails, to call ( ).

Restrictions
       The return values point to static data whose content is overwritten by each call.

Return Values
       Returns NULL (0) if name not found.

Files
       /etc/utmp

See Also
       getgrent(3), getpw(3), getpwent(3), utmp(5)

																       getlogin(3)
Related Man Pages
setlogin(2) - mojave
getlogin_r(3c) - opensolaris
getlogin(2) - osx
getlogin_r(2) - osf1
getlogin_r(3c) - sunos
Similar Topics in the Unix Linux Community
Regarding cuserid(), getlogin() and getpwuid() function in 'C'