1 .\" @(#)getlogin.3 6.2 (Berkeley) 5/9/86
3 .TH GETLOGIN 3 "May 9, 1986"
6 getlogin \- get login name
16 returns a pointer to the login name as found in
18 It may be used in conjunction with
20 to locate the correct password file entry when the same user ID
21 is shared by several login names.
25 is called within a process that is not attached to a
26 terminal, or if there is no entry in
28 for the process's terminal,
30 returns a null pointer.
31 A reasonable procedure for determining the login name is to first call
33 and if it fails, to call
34 .BR getpwuid ( getuid ()).
42 Returns a null pointer if the name cannot be found.
44 The return values point to static data
45 whose content is overwritten by each call.