DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ttyslot(3C)


ttyslot -- find the slot in the utmp file of the current user

Synopsis

   #include <stdlib.h>
   

int ttyslot (void);

Description

ttyslot returns the index of the current user's entry in the /var/adm/utmp file. The returned index is accomplished by scanning files in /dev for the name of the terminal associated with the standard input, the standard output, or the standard error output (0, 1, or 2).

Files

/var/adm/utmp

Errors

A value of -1 is returned if an error was encountered while searching for the terminal name or if none of the above file descriptors are associated with a terminal device.

References

getut(3G), ttyname(3C)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004