Print this page
14249 pseudo-terminal nomenclature should reflect POSIX
Change-Id: Ib4a3cef899ff4c71b09cb0dc6878863c5e8357bc
   1 PTSNAME(3C)              Standard C Library Functions              PTSNAME(3C)
   2 
   3 NAME
   4        ptsname - get name of the slave pseudo-terminal device
   5 
   6 SYNOPSIS
   7        #include <stdlib.h>
   8 
   9        char *ptsname(int fildes);

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




  20 RETURN VALUES
  21        Upon successful completion, the function ptsname() returns a pointer to
  22        a string which is the name of the pseudo-terminal slave device. This
  23        value points to a static data area that is overwritten by each call to
  24        ptsname(). Upon failure, ptsname() returns NULL. This could occur if
  25        fildes is an invalid file descriptor or if  the slave device name does
  26        not exist in the file system.
  27 
  28 ATTRIBUTES
  29        See attributes(5) for descriptions of the following attributes:

  30 


  31 


  32 
  33 
  34        +--------------------+-----------------+
  35        |  ATTRIBUTE TYPE    | ATTRIBUTE VALUE |
  36        +--------------------+-----------------+
  37        |Interface Stability | Standard        |
  38        +--------------------+-----------------+
  39        |MT-Level            | Safe            |
  40        +--------------------+-----------------+
  41 
  42 SEE ALSO
  43        open(2), grantpt(3C), ttyname(3C), unlockpt(3C), attributes(5),
  44        standards(5)
  45 
  46 
  47        STREAMS Programming Guide
  48 
  49                                 August 14, 2002                    PTSNAME(3C)
   1 PTSNAME(3C)              Standard C Library Functions              PTSNAME(3C)
   2 
   3 NAME
   4      ptsname - get the name of the subsidiary device of a pseudo-terminal
   5 
   6 SYNOPSIS
   7      #include <stdlib.h>
   8 
   9      char *
  10      ptsname(int fildes);
  11 

  12 DESCRIPTION
  13      The ptsname() function returns the name of the pseudo-terminal subsidiary
  14      device associated with a pseudo-terminal manager device.  The fildes
  15      argument is a file descriptor returned from a successful open of the
  16      pseudo-terminal manager device; e.g., by calling posix_openpt(3C) or by
  17      performing an open(2) of the ptm(7D) device.

  18 
  19      The ptsname() function returns a pointer to a string containing the null-
  20      terminated path name of the subsidiary device.  This string is of the
  21      form /dev/pts/N, where N is a non-negative integer.
  22 
  23 RETURN VALUES
  24      If successful, the ptsname() function returns a pointer to a string which
  25      is the name of the pseudo-terminal subsidiary device.  This value points
  26      to a static data area that is overwritten by each call to ptsname().



  27 
  28      Upon failure, ptsname() returns NULL.  This could occur if fildes is an
  29      invalid file descriptor or if the subsidiary device name does not exist
  30      in the file system.
  31 
  32 INTERFACE STABILITY
  33      Committed
  34 
  35 MT LEVEL
  36      Safe
  37 









  38 SEE ALSO
  39      open(2), grantpt(3C), posix_openpt(3C), ttyname(3C), unlockpt(3C),
  40      attributes(5), standards(5), ptm(7D), pts(7D)
  41 
  42 illumos                        February 5, 2022                        illumos