*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: ttyslot | Section: 3 | Source: Digital UNIX | File: ttyslot.3.gz
ttyslot(3) Library Functions Manual ttyslot(3) NAME ttyslot - Finds the slot for the current user in the user accounting database LIBRARY Standard C Library (libc.so, libc.a) SYNOPSIS #include <stdlib.h> int ttyslot (void); STANDARDS Interfaces documented on this reference page conform to industry stan- dards as follows: ttyslot(): XPG4-UNIX Refer to the standards(5) reference page for more information about in- dustry standards and associated tags. DESCRIPTION The ttyslot() function returns the index of the current user's entry in the user accounting database. The current user's entry is an entry for which the utline member matches the name of a terminal device associ- ated with any of the process' file descriptors 0, 1, or 2 (standard in- put, standard output, or error output). The index is an ordinal number representing the record number in the database of the current user's entry. The first entry in the database is represented by the return value 0 (zero). NOTES The ttyslot() function is scheduled to be withdrawn in a future version of the X/Open CAE Specification. [Digital] When compiled in the X/Open UNIX environment, calls to the ttyslot() function are internally renamed by prepending _E to the func- tion name. When you are debugging a module that includes the ttyslot() function and for which _XOPEN_SOURCE_EXTENDED has been defined, use _Ettyslot to refer to the ttyslot() call. See standards(5) for infor- mation on when the _XOPEN_SOURCE_EXTENDED macro is defined. RETURN VALUES Upon successful completion, the ttyslot() function returns the index of the current user's entry in the user accounting database. If an error is encountered while searching the database, or if none of the file descriptors 0, 1, or 2 is associated with a terminal device, -1 is returned. The following behavior does not conform to the current standards, and is supported only for backward compatibility. [Digital] In applications that are compiled in an environment that ex- cludes the _XOPEN_SOURCE_EXTENDED standard definitions, the ttyslot() function returns 0 (zero) on error. RELATED INFORMATION Functions: getutxent(3), ttyname(3) Standards: standards(5) delim off ttyslot(3)

Navigation Options