getttyent(3) Library Functions Manual getttyent(3) getttyent, getttynam, setttyent, endttyent - ttys (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(),| | MT-Unsafe race:ttyent | |setttyent(),| | | |endttyent(),| | | |getttynam()| | | +---------+------------------------------------+-----------------------+ BSD. /etc/ttys . ttyname(3), ttyslot(3) 3 . . : . 6.18 8 2026 getttyent(3)