HPlogo HP-UX Reference Volume 4 of 5 > l

logname(3C)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

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

STANDARDS CONFORMANCE

logname(): SVID2, XPG2

© Hewlett-Packard Development Company, L.P.