Print this page
14249 pseudo-terminal nomenclature should reflect POSIX
Change-Id: Ib4a3cef899ff4c71b09cb0dc6878863c5e8357bc

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/unlockpt.3c.man.txt
          +++ new/usr/src/man/man3c/unlockpt.3c.man.txt
   1    1  UNLOCKPT(3C)             Standard C Library Functions             UNLOCKPT(3C)
   2    2  
   3    3  NAME
   4      -       unlockpt - unlock a pseudo-terminal master/slave pair
        4 +     unlockpt - unlock a pseudo-terminal device pair
   5    5  
   6    6  SYNOPSIS
   7      -       #include <stdlib.h>
        7 +     #include <stdlib.h>
   8    8  
   9      -       int unlockpt(int fildes);
        9 +     int
       10 +     unlockpt(int fildes);
  10   11  
  11      -
  12   12  DESCRIPTION
  13      -       The unlockpt() function unlocks the slave pseudo-terminal device
  14      -       associated with the master to which fildes refers.
       13 +     When a pseudo-terminal manager device is opened, whether through
       14 +     posix_openpt(3C) or open(2) on a ptm(7D) device, the subsidiary device
       15 +     begins operation in a locked state.  The unlockpt() function unlocks the
       16 +     pseudo-terminal subsidiary device associated with the manager device to
       17 +     which fildes refers.
  15   18  
       19 +     Portable applications must call unlockpt() before opening the pseudo-
       20 +     terminal subsidiary device.
  16   21  
  17      -       Portable applications must call unlockpt() before opening the slave
  18      -       side of a pseudo-terminal device.
  19      -
  20   22  RETURN VALUES
  21      -       Upon successful completion, unlockpt() returns 0. Otherwise, it returns
  22      -       -1 and sets errno to indicate the error.
       23 +     The unlockpt() function returns the value 0 if successful; otherwise the
       24 +     value -1 is returned and the global variable errno is set to indicate the
       25 +     error.
  23   26  
       27 +EXAMPLES
       28 +     See posix_openpt(3C) for an example that includes a call to unlockpt().
       29 +
  24   30  ERRORS
  25      -       The unlockpt() function may fail if:
       31 +     The unlockpt() function may fail if:
  26   32  
  27      -       EBADF
  28      -                 The fildes argument is not a file descriptor open for
  29      -                 writing.
       33 +     EBADF              The fildes argument is not a file descriptor open for
       34 +                        writing.
  30   35  
       36 +     EINVAL             EINVAL The fildes argument is not associated with a
       37 +                        pseudo-terminal manager device.
  31   38  
  32      -       EINVAL
  33      -                 The fildes argument is not associated with a master pseudo-
  34      -                 terminal device.
       39 +INTERFACE STABILITY
       40 +     Committed
  35   41  
       42 +MT LEVEL
       43 +     Safe
  36   44  
  37      -ATTRIBUTES
  38      -       See attributes(5) for descriptions of the following attributes:
  39      -
  40      -
  41      -
  42      -
  43      -       +--------------------+-----------------+
  44      -       |  ATTRIBUTE TYPE    | ATTRIBUTE VALUE |
  45      -       +--------------------+-----------------+
  46      -       |Interface Stability | Standard        |
  47      -       +--------------------+-----------------+
  48      -       |MT-Level            | Safe            |
  49      -       +--------------------+-----------------+
  50      -
  51   45  SEE ALSO
  52      -       open(2), grantpt(3C), ptsname(3C), attributes(5), standards(5)
       46 +     open(2), grantpt(3C), posix_openpt(3C), ptsname(3C), attributes(5),
       47 +     standards(5), ptm(7D)
  53   48  
  54      -
  55      -       STREAMS Programming Guide
  56      -
  57      -                                August 14, 2002                   UNLOCKPT(3C)
       49 +illumos                        February 5, 2022                        illumos
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX