gettyent(3) Library Functions Manual gettyent(3)

getttyent, getttynam, setttyent, endttyent - obtiene una entrada del fichero de terminales

Biblioteca Estándar C (libc, -lc)

#include <ttyent.h>
struct ttyent *getttyent(void);
struct ttyent *getttynam(const char *nombre);
int setttyent(void);
int endttyent(void);

Estas funciones proporcionan una interfaz con el fichero _PATH_TTYS (p.e., /etc/ttys).

La función setttyent() abre el fichero o lo rebobina si ya está abierto.

La función endttyent() cierra el fichero.

The function getttynam() searches for a given terminal name in the file. It returns a pointer to a ttyent structure (description below).

The function getttyent() opens the file _PATH_TTYS (if necessary) and returns the first entry. If the file is already open, the next entry. The ttyent structure has the form:


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 */
};

ty_status puede ser:


#define TTY_ON      0x01  /* permite ingresos (arranca el programa ty_getty) */
#define TTY_SECURE  0x02  /* permite que el UID 0 ingrese */

Para obtener una explicación de los términos usados en esta sección, véase attributes(7).

Interfaz Atributo Valor
getttyent(), setttyent(), endttyent(), getttynam() Seguridad del hilo MT-Unsafe race:ttyent

BSD.

Bajo Linux el fichero /etc/ttys, y las funciones descritas arriba no se utilizan.

ttyname(3), ttyslot(3)

La traducción al español de esta página del manual fue creada por Gerardo Aburruzaga García <gerardo.aburruzaga@uca.es> y Marcos Fouces <marcos@debian.org>

Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.

Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org.

31 Octubre 2023 Páginas de manual de Linux 6.06