ttyslot(S-osr5)
ttyslot --
find the slot in the utmp file of the current user
Syntax
cc . . . -lc
#include <stdlib.h>
int ttyslot ()
Description
The ttyslot function
returns the index of the current user's entry in the
/etc/utmp file.
This is accomplished by
determining
the name of the terminal associated with the standard
input, the standard output, or the error output (0, 1 or 2).
Files
/etc/utmp
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 is associated with a terminal device.
See also
getut(S-osr5),
ttyname(S-osr5)
Standards conformance
The ttyslot routine
has been withdrawn from XPG3.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005