TTYSLOT(3C) INTERACTIVE UNIX System TTYSLOT(3C)
NAME
ttyslot - find the slot in the utmp file of the current user
SYNOPSIS
int ttyslot ( )
DESCRIPTION
The ttyslot function returns the index of the current user's
entry in the /etc/utmp file. This is accomplished by actu-
ally scanning the file /etc/inittab for the name of the ter-
minal associated with the standard input, the standard out-
put, or the error output (0, 1 or 2).
FILES
/etc/inittab
/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.
Rev. C Software Development Set Page 1