Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttyslot(3C) — CX/UX 6.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

int ttyslot ( )

DESCRIPTION

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

FILES

/etc/utmp

SEE ALSO

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

DIAGNOSTICS

A value of 0 is returned if an error was encountered while searching for the terminal name or if none of the above file descriptors is associated with a terminal device. 

BUGS

According to the 4.2BSD definition, ttyslot returns the caller’s slot in the /etc/ttys file. Since CX/UX does not use an /etc/ttys file, this routine defers to the ATT SYSV.2 definition.

CX/UX Programmer’s Reference Manual

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