1PTSNAME(3P)                POSIX Programmer's Manual               PTSNAME(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       ptsname — get name of the slave pseudo-terminal device
14

SYNOPSIS

16       #include <stdlib.h>
17
18       char *ptsname(int fildes);
19

DESCRIPTION

21       The ptsname() function shall return the name of the slave pseudo-termi‐
22       nal  device associated with a master pseudo-terminal device. The fildes
23       argument is a file descriptor that refers to  the  master  device.  The
24       ptsname()  function  shall  return a pointer to a string containing the
25       pathname of the corresponding slave device.
26
27       The ptsname() function need not be thread-safe.
28

RETURN VALUE

30       Upon successful completion, ptsname()  shall  return  a  pointer  to  a
31       string  which  is  the  name  of the pseudo-terminal slave device. Upon
32       failure, ptsname() shall return a null pointer.  This  could  occur  if
33       fildes  is  an invalid file descriptor or if the slave device name does
34       not exist in the file system.
35
36       The application shall not modify  the  string  returned.  The  returned
37       pointer might be invalidated or the string content might be overwritten
38       by a subsequent call to ptsname().
39

ERRORS

41       No errors are defined.
42
43       The following sections are informative.
44

EXAMPLES

46       None.
47

APPLICATION USAGE

49       None.
50

RATIONALE

52       See the RATIONALE section for posix_openpt().
53

FUTURE DIRECTIONS

55       None.
56

SEE ALSO

58       grantpt(), open(), posix_openpt(), ttyname(), unlockpt()
59
60       The Base Definitions volume of POSIX.1‐2008, <stdlib.h>
61
63       Portions of this text are reprinted and reproduced in  electronic  form
64       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
65       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
66       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
67       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
68       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
69       event of any discrepancy between this version and the original IEEE and
70       The  Open Group Standard, the original IEEE and The Open Group Standard
71       is the referee document. The original Standard can be  obtained  online
72       at http://www.unix.org/online.html .
73
74       Any  typographical  or  formatting  errors that appear in this page are
75       most likely to have been introduced during the conversion of the source
76       files  to  man page format. To report such errors, see https://www.ker
77       nel.org/doc/man-pages/reporting_bugs.html .
78
79
80
81IEEE/The Open Group                  2013                          PTSNAME(3P)
Impressum