NAME
logname() — return login name of user
SYNOPSIS
#include <unistd.h>
char *logname(void);
DESCRIPTION
logname()
returns a pointer to the null-terminated login name;
it extracts the
$LOGNAME
variable from the user's environment.
APPLICATION USAGE
logname()
is thread-safe. It is not async-cancel-safe.
WARNINGS
logname()
returns a pointer to static data
that is overwritten by each subsequent call.
This method of determining a login name is subject to forgery.
STANDARDS CONFORMANCE
logname(): SVID2, XPG2