Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttyslot(3C) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getut(3C)

ttyname(3C)

ttyslot(3C)

NAME

ttyslot() − find the slot in the utmp file of the current user

SYNOPSIS

#include <stdlib.h>

int ttyslot(void);

DESCRIPTION

ttyslot() returns the index of the current user’s entry in the /etc/utmp file.  This is accomplished by scanning /etc/utmp for the name of the terminal associated with the standard input, standard output, or standard error (file descriptor 0, 1 or 2). 

RETURN VALUE

ttyslot() returns −1 if an error was encountered while searching for the terminal name or if none of file descriptors 0, 1, or 2 is associated with a terminal device. 

FILES

/etc/utmp

SEE ALSO

getut(3C), ttyname(3C). 

STANDARDS CONFORMANCE

ttyslot(): XPG2

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

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