2 .\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
4 .\" SPDX-License-Identifier: GPL-1.0-or-later
6 .TH getttyent 3 (date) "Linux man-pages (unreleased)"
8 getttyent, getttynam, setttyent, endttyent \- get ttys file entry
11 .RI ( libc ", " \-lc )
14 .B "#include <ttyent.h>"
16 .B "struct ttyent *getttyent(void);"
17 .BI "struct ttyent *getttynam(const char *" name );
19 .B "int setttyent(void);"
20 .B "int endttyent(void);"
23 These functions provide an interface to the file
30 opens the file or rewinds it if already open.
38 searches for a given terminal name in the file.
39 It returns a pointer to a
41 structure (description below).
47 (if necessary) and returns the first entry.
48 If the file is already open, the next entry.
51 structure has the form:
56 char *ty_name; /* terminal device name */
57 char *ty_getty; /* command to execute, usually getty */
58 char *ty_type; /* terminal type for termcap */
59 int ty_status; /* status flags */
60 char *ty_window; /* command to start up window manager */
61 char *ty_comment; /* comment field */
71 #define TTY_ON 0x01 /* enable logins (start ty_getty program) */
72 #define TTY_SECURE 0x02 /* allow UID 0 to login */
76 For an explanation of the terms used in this section, see
82 Interface Attribute Value
90 T} Thread safety MT-Unsafe race:ttyent
97 and the functions described above, are not used.