unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

TTYSLOT(3V)                                                        TTYSLOT(3V)



NAME
       ttyslot - find the slot in the utmp file of the current process

SYNOPSIS
       int ttyslot()

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

RETURN VALUES
       On success, ttyslot() returns the index of the current user's entry  in
       /etc/utmp.   If an error was encountered while searching for the termi-
       nal name or if none of the above file descriptors is associated with  a
       terminal device, ttyslot() returns 0.

SYSTEM V RETURN VALUES
       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, ttyslot() returns -1.

FILES
       /etc/ttytab
       /etc/utmp



                                21 January 1990                    TTYSLOT(3V)