.\" 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 " .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)