Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ logname(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

env(C)

environ(M)

getenv(S)

login(M)

profile(M)


 logname(S)                     6 January 1993                     logname(S)


 Name

    logname - return login name of user

 Syntax


    cc ... -lPW


    char *logname ()


 Description

    The logname function returns a pointer to the null-terminated login name;
    it extracts the LOGNAME environment variable from the user's environment.

 Files

    /etc/profile

 Notes

    The return values point to static data whose content is overwritten by
    each call.

    This method of determining a login name is subject to forgery.

 See also

    env(C), environ(M), getenv(S), login(M), profile(M)

 Standards conformance

    logname is conformant with:
    AT&T SVID Issue 2, but has been withdrawn from XPG3.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026