Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttyslot(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getutent

ttyname, isatty

     ttyslot

Purpose

     Finds the slot in the utmp file for the current user.

Library

     Standard C Library (libc.a)

Syntax

     int ttyslot ( )

Description

     The ttyslot  subroutine returns the index  of the current
     user's entry in the  /etc/utmp file.  The ttyslot subrou-
     tine scans  the /etc/utmp file  for the name of  the ter-
     minal associated  with the  standard input,  the standard
     output, or the error output (0, 1, or 2).

     The ttyslot subroutine returns 0 if an error was encount-
     ered while searching for the terminal name, or if none of
     the first three file descriptors (0, 1, and 2) is associ-
     ated with a terminal device.

Files

     /etc/inittab
     /etc/utmp

Related Information

     In this book:  "getutent" and "ttyname, isatty."

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