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 2013-07-22 "GNU" "Linux Programmer's Manual"
9 getttyent, getttynam, setttyent, endttyent \- get ttys file entry
11 .B "#include <ttyent.h>"
13 .B "struct ttyent *getttyent(void);"
15 .BI "struct ttyent *getttynam(const char *" name );
17 .B "int setttyent(void);"
19 .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 */
73 .SS Multithreading (see pthreads(7))
76 function returns a pointer to a static variable, so it is not thread-safe.
82 functions use a static variable, so they are not thread-safe.
86 function calls thread-unsafe function
88 so it is not thread-safe.
91 Present on the BSDs, and perhaps other systems.
95 and the functions described above, are not used.
100 This page is part of release 3.68 of the Linux
103 A description of the project,
104 information about reporting bugs,
105 and the latest version of this page,
107 \%http://www.kernel.org/doc/man\-pages/.