HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
t
ttyslot(3C) ttyslot(3C)
(TO BE OBSOLETED)
NAME
ttyslot() - find the slot in the utmp file of the current user
SYNOPSIS
#include <stdlib.h>
int ttyslot(void);
DESCRIPTION
ttyslot() returns the index of the current user’s entry in the /etc/utmp file. This is accomplished
by scanning /etc/utmp for the name of the terminal associated with the standard input, standard out-
put, or standard error (file descriptor 0, 1 or 2).
RETURN VALUE
ttyslot() returns 1 if an error was encountered while searching for the terminal name or if none of
file descriptors 0, 1, or 2 is associated with a terminal device.
APPLICATION USAGE
ttyslot() is thread-safe. It is not async-cancel-safe. A cancellation point may occur when a thread is
executing ttyslot().
WARNINGS
Obsolescent Interfaces
ttyslot() is to be obsoleted at a future date.
FILES
/etc/utmp
SEE ALSO
getut(3C), ttyname(3C).
STANDARDS CONFORMANCE
ttyslot(): XPG2
HP-UX Release 11i: December 2000 1 Section 3991
___
___