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           Glibc 2.23 and earlier:
20               _XOPEN_SOURCE
21

DESCRIPTION

23       The  unlockpt() function unlocks the slave pseudoterminal device corre‐
24       sponding to the master pseudoterminal referred to by the file  descrip‐
25       tor 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 to indicate the error.
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 at‐
44       tributes(7).
45
46       ┌────────────────────────────────────────────┬───────────────┬─────────┐
47Interface                                   Attribute     Value   
48       ├────────────────────────────────────────────┼───────────────┼─────────┤
49unlockpt()                                  │ Thread safety │ MT-Safe │
50       └────────────────────────────────────────────┴───────────────┴─────────┘
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.13 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                                  2021-03-22                       UNLOCKPT(3)
Impressum