NAME
getttyent, getttynam, setttyent, endttyent - get ttys file entry
SYNOPSIS
#include <ttyent.h> struct ttyent *getttyent(void); struct ttyent *getttynam(const char *name); int setttyent(void); int endttyent(void);
DESCRIPTION
These functions provide an interface to the file _PATH_TTYS (e.g., /etc/ttys). The function setttyent() opens the file or rewinds it if already open. The function endttyent() closes the file. 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; /* terminal device name */ char *ty_getty; /* command to execute, usually getty */ char *ty_type; /* terminal type for termcap */ int ty_status; /* status flags */ char *ty_window; /* command to start up window manager */ char *ty_comment; /* comment field */ }; ty_status can be: #define TTY_ON 0x01 /* enable logins (start ty_getty program) */ #define TTY_SECURE 0x02 /* allow UID 0 to login */
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). ┌──────────────────────────┬───────────────┬───────────────────────┐ │Interface │ Attribute │ Value │ ├──────────────────────────┼───────────────┼───────────────────────┤ │getttyent(), setttyent(), │ Thread safety │ MT-Unsafe race:ttyent │ │endttyent(), getttynam() │ │ │ └──────────────────────────┴───────────────┴───────────────────────┘
CONFORMING TO
Not in POSIX.1. Present on the BSDs, and perhaps other systems.
NOTES
Under Linux, the file /etc/ttys, and the functions described above, are not used.
SEE ALSO
ttyname(3), ttyslot(3)
COLOPHON
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
More Linux Commands
manpages/putwin.3ncurses.html
putwin(3ncurses) - miscellaneous curses utility routines....
The unctrl routine returns a character string which is a printable representation of the character c, ignoring attributes. Control characters are displayed in t
manpages/csinhl.3.html
csinhl(3) - complex hyperbolic sine - Linux manual page.....
The complex hyperbolic sine function is defined as: csinh(z) = (exp(z)-exp(-z))/2 VERSIONS These functions first appeared in glibc in version 2.1. CONFORMING TO
manpages/XpEndPage.3x.html
XpEndPage(3x) - Indicates the end of a print page. (ManPage)
XpEndPage signals the end of a print page, and causes window to be unmapped. All resulting page data is assembled and combined with data previously sent by XpPu
manpages/set_menu_grey.3menu.html
set_menu_grey(3menu) - color and attribute control for menus
The function set_menu_fore sets the foreground attribute of menu. This is the highlight used for selected menu items. menu_fore returns the foreground attribute
manpages/audit_delete_rule_data.3.html
audit_delete_rule_data(3) - Delete audit rule (Man Page)....
audit_delete_rule_data is used to delete rules that are currently loaded in the kernel. To delete a rule, you must set up the rules identical to the one being d
manpages/fabs.3.html
fabs(3) - absolute value of floating-point number (ManPage)
These functions return the absolute value of the floating-point number x. RETURN VALUE These functions return the absolute value of x. If x is a NaN, a NaN is r
manpages/wcstok.3.html
wcstok(3) - split wide-character string into tokens.........
The wcstok() function is the wide-character equivalent of the strtok(3) function, with an added argument to make it multithread-safe. It can be used to split a
manpages/perl5124delta.1.html
perl5124delta(1) what is new for perl v5.12.4 (Man Page)....
This document describes differences between the 5.12.3 release and the 5.12.4 release. If you are upgrading from an earlier release such as 5.12.2, first read p
manpages/gnutls_x509_crt_get_key_id.3.html
gnutls_x509_crt_get_key_id(3) - API function (Man Page).....
gnutls_x509_crt_get_key_id.3 - This function will return a unique ID the depends on the public key parameters. This ID can be used in checking whether a certifi
manpages/XSetModifierMapping.3.html
XSetModifierMapping(3) - manipulate keyboard encoding and ke
The XChangeKeyboardMapping function defines the symbols for the specified number of KeyCodes starting with first_keycode. The symbols for KeyCodes outside this
manpages/y1l.3.html
y1l(3) - Bessel functions of the second kind (Man Page).....
The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x
manpages/gnutls_rsa_params_export_pkcs1.3.html
gnutls_rsa_params_export_pkcs1(3) - API function (Man Page)
This function will export the given RSA parameters to a PKCS1 RSAPublicKey structure. If the buffer provided is not long enough to hold the output, then GNUTLS_
