1 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
4 .\" Distributed under GPL
7 .TH GETTTYENT 3 2021-03-22 "GNU" "Linux Programmer's Manual"
9 getttyent, getttynam, setttyent, endttyent \- get ttys file entry
12 .B "#include <ttyent.h>"
14 .B "struct ttyent *getttyent(void);"
15 .BI "struct ttyent *getttynam(const char *" name );
17 .B "int setttyent(void);"
18 .B "int endttyent(void);"
21 These functions provide an interface to the file
28 opens the file or rewinds it if already open.
36 searches for a given terminal name in the file.
37 It returns a pointer to a
39 structure (description below).
45 (if necessary) and returns the first entry.
46 If the file is already open, the next entry.
49 structure has the form:
54 char *ty_name; /* terminal device name */
55 char *ty_getty; /* command to execute, usually getty */
56 char *ty_type; /* terminal type for termcap */
57 int ty_status; /* status flags */
58 char *ty_window; /* command to start up window manager */
59 char *ty_comment; /* comment field */
69 #define TTY_ON 0x01 /* enable logins (start ty_getty program) */
70 #define TTY_SECURE 0x02 /* allow UID 0 to login */
74 For an explanation of the terms used in this section, see
82 Interface Attribute Value
88 T} Thread safety MT-Unsafe race:ttyent
95 Present on the BSDs, and perhaps other systems.
99 and the functions described above, are not used.