01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GETLOGIN ( 3C ) GETLOGIN ( 3C )<br />

NAME<br />

getlogin - get login name<br />

SYNOPSIS<br />

char •getlogin ( );<br />

DESCRIPTION<br />

Getlogin returns a pointer to the login name as found in<br />

/etc/utmp. It may be used in conjunction with getpwnam to<br />

locate the correct password file entry when the same user ID is<br />

shared by several login names.<br />

If getlogin is called within a process that is not attached to a terminal,<br />

it returns a NULL pointer. The correct procedure for<br />

determining the login name is to call cuserid, or to call getlogin<br />

and if it fails to call getpwuid .<br />

FILES<br />

fetcjutmp<br />

SEE ALSO<br />

cuserid(3S), getgrent(3C), getpwent(3C), utmp(4).<br />

DIAGNOSTICS<br />

Returns the NULL pointer if name not found.<br />

BUGS<br />

The return values point to static data whose content is overwritten<br />

by each call.<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!