Query: ttyslot
OS: minix
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
TTYSLOT(3) Library Functions Manual TTYSLOT(3)NAMEttyslot, fttyslot - utmp slot numberSYNOPSIS#define _MINIX_SOURCE 1 #include <unistd.h> int ttyslot(void) int fttyslot(int fd)DESCRIPTIONTtyslot() returns the index of the login terminal in the utmp file. It tries fttyslot() on file descriptors 0, 1, and 2 to find the index. Fttyslot() returns the utmp index of the terminal associated with file descriptor fd. First it tries to map fd to a terminal name with ttyname(3), then it searches the ttytab(5) database with the getttyent(3) function for this terminal. This means that the utmp slot number is the same as the ttytab entry number counting from 1. The value 0 is returned if no slot number can be found for a file descriptor.SEE ALSOttyname(3), getttyent(3), utmp(5), ttytab(5), init(8).NOTESSince 0 is used as an error return this means that the first entry in the utmp file is not used. Ttyslot() is often found in a UNIX implementation, fttyslot() is Minix specific.AUTHORKees J. Bot (kjb@cs.vu.nl) TTYSLOT(3)
Related Man Pages |
---|
ttyslot(3) - centos |
ttyslot(3) - debian |
wtmp(4) - osf1 |
ttyslot(3) - xfree86 |
ttyslot(3) - opendarwin |
Similar Topics in the Unix Linux Community |
---|
cantidad de slot de memoria |
Telegram Bots - Bot Code Examples |