HP 3000 Manuals

ttyname [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation


MPE/iX Developer's Kit Reference Manual Volume I

ttyname 

Determines terminal device name.

Syntax 

     #include <unistd.h>
     char *ttyname(int fildes);

Parameters 

fildes     An open file descriptor.

Return Values 

The ttyname() function returns a NULL pointer if filedes is not a valid
file descriptor associated with a terminal or if the pathname cannot be
determined.

Description 

The ttyname function returns a pointer to a string containing a
null-terminated pathname of the terminal associated with file descriptor
fildes.

Implementation Considerations 

None.

Errors 

If an error occurs, errno is set to the following value:

EBADF             CAUSE           The fildes parameter is not a valid open file
                                  descriptor.
                  ACTION          Check to see if fildes has been altered or not
                                  initialized.

See Also 

ctermid(), isatty(), POSIX.1



MPE/iX 5.0 Documentation