getlogin(3)getlogin(3)Namegetlogin - get login name
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 ( ).
The return values point to static data whose content is overwritten by
Returns NULL (0) if name not found.
See Alsogetgrent(3), getpw(3), getpwent(3), utmp(5)getlogin(3)