1UNLOCKPT(3)                Linux Programmer's Manual               UNLOCKPT(3)
2
3
4

NAME

6       unlockpt - unlock a pseudoterminal master/slave pair
7

SYNOPSIS

9       #define _XOPEN_SOURCE
10       #include <stdlib.h>
11
12       int unlockpt(int fd);
13
14   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
15
16       unlockpt():
17           Since glibc 2.24:
18               _XOPEN_SOURCE >= 500 ||
19                   (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED)
20           Glibc 2.23 and earlier:
21               _XOPEN_SOURCE
22

DESCRIPTION

24       The  unlockpt() function unlocks the slave pseudoterminal device corre‐
25       sponding to the master pseudoterminal referred to by fd.
26
27       unlockpt() should be called before opening the slave side  of  a  pseu‐
28       doterminal.
29

RETURN VALUE

31       When  successful,  unlockpt()  returns 0.  Otherwise, it returns -1 and
32       sets errno appropriately.
33

ERRORS

35       EBADF  The fd argument is not a file descriptor open for writing.
36
37       EINVAL The fd argument is not associated with a master pseudoterminal.
38

VERSIONS

40       unlockpt() is provided in glibc since version 2.1.
41

ATTRIBUTES

43       For  an  explanation  of  the  terms  used   in   this   section,   see
44       attributes(7).
45
46       ┌───────────┬───────────────┬─────────┐
47Interface  Attribute     Value   
48       ├───────────┼───────────────┼─────────┤
49unlockpt() │ Thread safety │ MT-Safe │
50       └───────────┴───────────────┴─────────┘

CONFORMING TO

52       POSIX.1-2001, POSIX.1-2008.
53

SEE ALSO

55       grantpt(3), posix_openpt(3), ptsname(3), pts(4), pty(7)
56

COLOPHON

58       This  page  is  part of release 4.15 of the Linux man-pages project.  A
59       description of the project, information about reporting bugs,  and  the
60       latest     version     of     this    page,    can    be    found    at
61       https://www.kernel.org/doc/man-pages/.
62
63
64
65                                  2017-07-13                       UNLOCKPT(3)
Impressum