man pages section 3: Basic Library Functions
  Suchtext Nur in diesem Buch
Sehen Sie dieses Buch:
Dieses Buch im PDF-Format herunterladen (3779 KB)

ptsname(3C)

Name | Synopsis | Description | Return Values | Attributes | See Also

Name

    ptsname– get name of the slave pseudo-terminal device

Synopsis

    #include <stdlib.h>
    
    char *ptsname(int fildes);

Description

    The ptsname() function returns the name of the slave pseudo-terminal device associated with a master pseudo-terminal device. fildes is a file descriptor returned from a successful open of the master device. ptsname() returns a pointer to a string containing the null-terminated path name of the slave device of the form /dev/pts/N, where N is a non-negative integer.

Return Values

    Upon successful completion, the function ptsname() returns a pointer to a string which is the name of the pseudo-terminal slave device. This value points to a static data area that is overwritten by each call to ptsname(). Upon failure, ptsname() returns NULL. This could occur if fildes is an invalid file descriptor or if the slave device name does not exist in the file system.

Attributes

    See attributes(5) for descriptions of the following attributes:

    ATTRIBUTE TYPE 

    ATTRIBUTE VALUE 

    Interface Stability 

    Standard 

    MT-Level 

    Safe 

See Also

SunOS 5.10  Last Revised 14 Aug 2002

Name | Synopsis | Description | Return Values | Attributes | See Also