ttyslot(3) Library Functions Manual ttyslot(3) ttyslot - (libc -lc) #include /* */ int ttyslot(void); glibc ( feature_test_macros(7)): ttyslot(): Since glibc 2.24: _DEFAULT_SOURCE From glibc 2.20 to glibc 2.23: _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) glibc 2.19 and earlier: _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) ttyslot() . " " . /etc/ttys UNIX V6 init(1) . . '0' '1' '0' "". : '8' "/dev/tty8". getty(8) ('-' : 110 ). "18-". '1' '0' init init. UNIX V7 : getty(8) ('0' : 300-1200-150-110 '4' DECwriter) . "14console". . System V /etc/inittab . (2) /etc/utmp . login(1). login(1) ttyslot() /etc/ttys ( 1). ttyslot ttyslot() /etc/ttys () /etc/utmp. BSD /etc/ttys System V . ttyslot() . . ( 0 1 2 ) 0 UNIX V6 V7 BSD -1 System V. attributes(7). +----------------------+------------------------------------+--------------------------------------------------------------------+ | | | | +----------------------+------------------------------------+--------------------------------------------------------------------+ |ttyslot() | | (MT-Unsafe) | +----------------------+------------------------------------+--------------------------------------------------------------------+ utmp /etc/utmp /var/adm/utmp /var/run/utmp. . SUSv1 LEGACY SUSv2 POSIX.1-2001. SUSv2 -1 . glibc2 _PATH_TTYS "/etc/ttys". 0 . Linux "/etc/ttys" 0. BSD Linux ttyslot() . System V . glibc 2.24 : (_XOPEN_SOURCE >= 500 || (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED)) && ! (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) Minix fttyslot(fd). getttyent(3) ttyname(3) utmp(5) 3 . . : . 6.18 8 2026 ttyslot(3)