.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)getttyent.3 6.4 (Berkeley) %G%
getttyent, getttynam, setttyent, endttyent \- get ttys file entry
.B struct ttyent *getttyent()
.B struct ttyent *getttynam(name)
each return a pointer to an object with the
containing the broken-out
fields of a line from the tty description file.
.so /usr/include/ttyent.h
.IP ty_name \w'ty_comment'u+3
is the name of the character-special file in the directory ``/dev".
For various reasons, it must reside in the directory ``/dev".
to initialize tty line characteristics.
In fact, any arbitrary command can be used;
a typical use is to initiate a terminal emulator in a window system.
is the name of the default terminal type connected to this tty line. This
is typically a name from the
The environment variable `TERM' is initialized with this name by
is a mask of bit fields which indicate various actions to be allowed on this
tty line. The following is a description of each flag.
.IP TTY_ON \w'TTY_SECURE'u+3
will start the specified ``getty" command
Allows root to login on this terminal. Note that `TTY_ON' must be included
is the command to execute for a window system
associated with the line. The window system will be started before
the command specified in the
If none is specified, this will be null.
is the trailing comment field, if any; a leading delimiter and white space
line from the ttys file, opening the file if necessary;
searches from the beginning of the file until a matching
(or until EOF is encountered).
login(1), ttyslot(3), ttys(5), gettytab(5), termcap(5), getty(8), init(8)
(0) returned on EOF or error.
is contained in a static area
so it must be copied if it is