1 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
5 .TH GETTTYENT 3 2021-03-22 "Linux man-pages (unreleased)" "Linux Programmer's Manual"
7 getttyent, getttynam, setttyent, endttyent \- get ttys file entry
10 .RI ( libc ", " \-lc )
13 .B "#include <ttyent.h>"
15 .B "struct ttyent *getttyent(void);"
16 .BI "struct ttyent *getttynam(const char *" name );
18 .B "int setttyent(void);"
19 .B "int endttyent(void);"
22 These functions provide an interface to the file
29 opens the file or rewinds it if already open.
37 searches for a given terminal name in the file.
38 It returns a pointer to a
40 structure (description below).
46 (if necessary) and returns the first entry.
47 If the file is already open, the next entry.
50 structure has the form:
55 char *ty_name; /* terminal device name */
56 char *ty_getty; /* command to execute, usually getty */
57 char *ty_type; /* terminal type for termcap */
58 int ty_status; /* status flags */
59 char *ty_window; /* command to start up window manager */
60 char *ty_comment; /* comment field */
70 #define TTY_ON 0x01 /* enable logins (start ty_getty program) */
71 #define TTY_SECURE 0x02 /* allow UID 0 to login */
75 For an explanation of the terms used in this section, see
83 Interface Attribute Value
89 T} Thread safety MT-Unsafe race:ttyent
96 Present on the BSDs, and perhaps other systems.
100 and the functions described above, are not used.