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

NAME

6       unlockpt - unlock a pseudo-terminal master/slave pair
7

SYNOPSIS

9       #define _XOPEN_SOURCE
10       #include <stdlib.h>
11
12       int unlockpt(int fd);
13

DESCRIPTION

15       The  unlockpt() function unlocks the slave pseudo-terminal device (pty)
16       corresponding to the master pty referred to by fd.
17
18       unlockpt() should be called before opening the slave side of a pty.
19

RETURN VALUE

21       When successful, unlockpt() returns 0.  Otherwise, it  returns  -1  and
22       sets errno appropriately.
23

ERRORS

25       EBADF  The fd argument is not a file descriptor open for writing.
26
27       EINVAL The fd argument is not associated with a master pty.
28

VERSIONS

30       unlockpt() is provided in glibc since version 2.1.
31

CONFORMING TO

33       POSIX.1-2001.
34

SEE ALSO

36       grantpt(3),      posix_openpt(3),      ptsname(3),     pts(4),     fea‐
37       ture_test_macros(7), pty(7)
38

COLOPHON

40       This page is part of release 3.22 of the Linux  man-pages  project.   A
41       description  of  the project, and information about reporting bugs, can
42       be found at http://www.kernel.org/doc/man-pages/.
43
44
45
46                                  2008-06-14                       UNLOCKPT(3)
Impressum