Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttyslot(3) — SunOS 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

TTYSLOT(3)  —  C LIBRARY FUNCTIONS

NAME

ttyslot − find the slot in the utmp file of the current process

SYNOPSIS

ttyslot()

DESCRIPTION

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

FILES

/etc/ttys

/etc/utmp

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. 

Sun Release 4.0  —  Last change: 6 October 1987

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