getttyent(3) Library Functions Manual getttyent(3) getttyent, getttynam, setttyent, endttyent - ttys LIBRARY Standard C library (libc, -lc) #include struct ttyent *getttyent(void); struct ttyent *getttynam(const char *name); int setttyent(void); int endttyent(void); _PATH_TTYS (, /etc/ttys). setttyent() , . endttyent() . getttynam() . ttyent ( ). getttyent() _PATH_TTYS ( ) . , . ttyent: struct ttyent { char *ty_name; /* */ char *ty_getty; /* , getty */ char *ty_type; /* termcap */ int ty_status; /* */ char *ty_window; /* */ char *ty_comment; /* */ }; ty_status : #define TTY_ON 0x01 /* ( ty_getty) */ #define TTY_SECURE 0x02 /* UID 0 */ attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |getttyent(), setttyent(), | | MT-Unsafe race:ttyent | |endttyent(), getttynam() | | | +----------------------------+----------------------------------------------------------+--------------------------+ BSD. Linux /etc/ttys . . ttyname(3), ttyslot(3) Azamat Hackimov , Dmitry Bolkhovskikh , Vladislav , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . getttyent(3)