ttyslot(3C) DG/UX 5.4R3.00 ttyslot(3C)
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
/var/adm/utmp file. The returned index is accomplished by scanning
files in /dev for the name of the terminal associated with the
standard input, the standard output, or the standard error output (0,
1, or 2).
FILES
/var/adm/utmp
Considerations for Threads Programming
+---------+-----------------------------+
| | async- |
|function | reentrant cancel cancel |
| | point safe |
+---------+-----------------------------+
|ttyslot | Y N N |
+---------+-----------------------------+
SEE ALSO
reentrant(3), getut(3C), ttyname(3C).
DIAGNOSTICS
A value of -1 is returned if an error was encountered while searching
for the terminal name or if none of the above file descriptors are
associated with a terminal device.
Licensed material--property of copyright holder(s) 1