Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttyslot(3) — OSF/1 X2.0-8 MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getutent(3)

ttyname(3)

ttyslot(3)  —  Subroutines

OSF

NAME

ttyslot − Finds the slot in the utmp file for the current user

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

int ttyslot ( void );

DESCRIPTION

The ttyslot() function returns the index of the current user’s entry in the /etc/utmp file. The ttyslot() function scans the /etc/utmp file for the name of the terminal associated with the standard input, the standard output, or the error output file descriptors (0, 1, or 2). 

RETURN VALUES

Upon successful completion, the ttyslot() function returns the index of the current user’s entry in the /etc/utmp file.  Otherwise, if an error is encountered while searching for the terminal name, or if none of the first three file descriptors (0, 1, and 2) is associated with a terminal device, 0 (zero) is returned. 

RELATED INFORMATION

Functions: getutent(3), ttyname(3)

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