*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> ttyslot (3)              
Title
Content
Arch
Section
 

ttyslot(3)

Contents


NAME    [Toc]    [Back]

       ttyslot  -  Find the slot for the current user in the user
       accounting database

SYNOPSIS    [Toc]    [Back]

       #include <stdlib.h>

       int ttyslot(
               void );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

STANDARDS    [Toc]    [Back]

       Interfaces documented on this reference  page  conform  to
       industry standards as follows:

       ttyslot():  XSH4.2

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

DESCRIPTION    [Toc]    [Back]

       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 associated with any
       of the process' file descriptors  0,  1,  or  2  (standard
       input,  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    [Toc]    [Back]

       The  ttyslot()  function is scheduled to be withdrawn in a
       future version of the X/Open CAE Specification.

       [Tru64 UNIX]  When compiled in the  X/Open  UNIX  environment,
  calls  to  the  ttyslot()  function  are internally
       renamed by prepending _E to the function  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    information     on     when     the
       _XOPEN_SOURCE_EXTENDED macro is defined.

RETURN VALUES    [Toc]    [Back]

       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.


       [Tru64  UNIX]  In  applications  that  are  compiled in an
       environment that excludes the _XOPEN_SOURCE_EXTENDED standard
  definitions, the ttyslot() function returns 0 (zero)
       on error.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: getutxent(3), ttyname(3)

       Standards: standards(5)



                                                       ttyslot(3)
[ Back ]
 Similar pages
Name OS Title
ttyslot IRIX find the slot in the utmp file of the current user
utmps HP-UX user-accounting database
utmpd HP-UX user accounting database daemon
pututxline Tru64 Access user accounting database functions
setutxent Tru64 Access user accounting database functions
getutxline Tru64 Access user accounting database functions
getutxid Tru64 Access user accounting database functions
getutxent Tru64 Access user accounting database functions
endutxent Tru64 Access user accounting database functions
setpwfile Tru64 Access user attribute information in the user database
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service