ttyname man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



ttyname(3C)							   ttyname(3C)

NAME
     ttyname, ttyname_r, isatty - find name of a terminal

SYNOPSIS
     #include <stdlib.h>
     #include <unistd.h>

     char *ttyname (int fildes);

     int ttyname_r (int fildes, char *buf, size_t buflen);

     int isatty (int fildes);

DESCRIPTION
     ttyname returns a pointer to a string containing the null-terminated path
     name of the terminal device associated with file descriptor fildes.
     ttyname_r is a reentrant version of ttyname where buf and buflen give the
     location and maximum size of where the resultant string should be placed.
     The maximum length of the terminal name is {TTY_NAME_MAX}.	 sysconf(3C)
     may be used to determine this value.

     isatty returns 1 if fildes is associated with a terminal device, 0
     otherwise.

FILES
     /dev/*

DIAGNOSTICS
     ttyname returns a NULL pointer if fildes does not describe a terminal
     device in directory /dev.

     ttyname_r returns 0 on success or an error number on failure.  If fildes
     doesn't refer to a valid file descriptor, EBADF is returned.  If fildes
     doesn't refer to a valid terminal device, ENOTTY is returned.  If the
     value of buflen is smaller than the length of the string to be returned
     including the terminating null character, ERANGE is returned.

NOTES
     The return value of ttyname points to static data whose content is
     overwritten by each call.

									Page 1

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net