1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
.\" Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
.\" Distributed under GPL
.\"
.TH GETTTYENT 3 "18 julio 2002" "glibc"
.SH NOMBRE
getttyent, getttynam, setttyent, endttyent - obtiene una entrada del fichero de terminales
.SH SINOPSIS
.sp
.B "#include <ttyent.h>"
.sp
.B "struct ttyent *getttyent(void);"
.sp
.BI "struct ttyent *getttynam(const char *" name );
.sp
.B "int setttyent(void);"
.sp
.B "int endttyent(void);"
.SH DESCRIPCIÓN
Estas funciones proporcionan una interfaz con el fichero
.B _PATH_TTYS
(p.e.,
.IR /etc/ttys ).
La función
.BR setttyent ()
abre el fichero o lo rebobina si ya está abierto.
La función
.BR endttyent ()
cierra el fichero.
La función
.BR getttynam ()
busca un nombre de terminal dado en el fichero. Devuelve un puntero
a una estructura ttyent (descrita abajo).
La función
.BR getttyent ()
abre el fichero _PATH_TTYS (si es necesario) y devuelve la primera entrada.
Si el fichero ya está abierto, devuelve la siguiente entrada.
.SS "La estructura ttyent"
.nf
struct ttyent {
char *ty_name; /* nombre del dispositivo de terminal */
char *ty_getty; /* orden a ejecutar, normalmente getty */
char *ty_type; /* tipo de terminal para termcap */
int ty_status; /* flags de estado */
char *ty_window; /* orden para incializar el gestor de ventanas */
char *ty_comment; /* campo para comentarios */
};
.fi
.I ty_status
puede ser
.br
.nf
#define TTY_ON 0x01 /* permite ingresos (arranca el programa ty_getty) */
#define TTY_SECURE 0x02 /* permite que el uid 0 ingrese */
.fi
.SH OBSERVACIONES
Bajo Linux el fichero
.IR /etc/ttys ,
y las funciones descritas arriba no se utilizan.
.SH "VÉASE TAMBIÉN"
.BR ttyname (3),
.BR ttyslot (3)
|