HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
l
logname(3C) logname(3C)
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.
FILES
/etc/profile
SEE ALSO
env(1), login(1), profile(4), environ(5).
STANDARDS CONFORMANCE
logname(): SVID2, XPG2
Section 3500 1 HP-UX Release 11i: December 2000
___
___