Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getlogin.bsd(3) — Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpwent(3)

getgrent(3)

getpwuid(3)

GETLOGIN(3)

NAME

getlogin − get log-in name

USAGE

char *getlogin()

DESCRIPTION

Getlogin returns a pointer to the user’s log-in name.  It may be used in conjunction with getpwnam to locate the correct password file entry when several log-in names share the same user ID. 

If getlogin is called within a process that is not attached to a terminal, it returns NULL.  To determine the log-in name, first call getlogin; if it fails, call getpwuid(getuid()). 

NOTES

The return values point to static data, which each call overwrites. 

DIAGNOSTICS

Returns NULL (zero) if name is not found. 

RELATED INFORMATION

getpwent(3), getgrent(3), getpwuid(3)

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