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 the file  descrip‐
26       tor fd.
27
28       unlockpt()  should  be  called before opening the slave side of a pseu‐
29       doterminal.
30

RETURN VALUE

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

ERRORS

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

VERSIONS

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

ATTRIBUTES

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

CONFORMING TO

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

SEE ALSO

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

COLOPHON

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