#include <libc.h> /* POSIX applications #include <unistd.h> */
char *getlogin(void);
If getlogin is called within a process that is not attached to a terminal, or if there is no entry in /etc/utmp for the process's terminal, getlogin returns a NULL pointer (0). A reasonable procedure for determining the login name is to first call getlogin and if it fails, to call getpwuid(getuid()).
The return values point to static data whose content is overwritten by each call.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97