Open System Services System Calls Reference Manual (G06.25+, H06.03+)

getlogin(2) OSS System Calls Reference Manual
NAME
getlogin - Gets login name
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsecsrl
H-series OSS processes: /G/system/zdllnnn/zsecdll
SYNOPSIS
#include <unistd.h>
char *getlogin(void);
DESCRIPTION
The getlogin() function returns the login name associated with the current session.
The login name can be a username or a user alias.
The name is normally associated with a login shell at the time a session is created, and it is inher-
ited by all processes descended from the login shell. (This is true even if some of those processes
assume another user ID.)
RETURN VALUES
Upon successful completion, the login name is stored in the location pointed to by the returned
value.
If the authentication information for a process is uninitialized, a null string is returned.
RELATED INFORMATION
Functions: geteuid(2), getuid(2).
340 Hewlett-Packard Company 527186-003