TTYSLOT(3,L) AIX Technical Reference TTYSLOT(3,L) ------------------------------------------------------------------------------- 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 subroutine scans the /etc/utmp file for the name of the terminal associated with the standard input, the standard output, or the error output (0, 1, or 2). The ttyslot subroutine returns -1 if an error was 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. Warning: If the Transparent Computing Facility is installed, the process calling ttyslot must have its file system equal to the file system of the cluster site where the terminal associated with standard input, standard output or standard error is physically attached. Otherwise, incorrect results may be produced. FILES /etc/inittab /etc/utmp RELATED INFORMATION In this book: "getut: getutent, getutid, getutline, pututline, setutent, endutent, utmpname" and "ttyname, isatty, fullttyname." Processed November 7, 1990 TTYSLOT(3,L) 1